diff --git a/.env.development b/.env.development index 39f4b1a..ace25a5 100644 --- a/.env.development +++ b/.env.development @@ -10,7 +10,7 @@ LMS_BASE_URL='http://localhost:18000' LOGIN_URL='http://localhost:18000/login' LOGOUT_URL='http://localhost:18000/logout' MARKETING_SITE_BASE_URL='http://localhost:18000' -ORDER_HISTORY_URL='localhost:1996/orders' +ORDER_HISTORY_URL='http://localhost:1996/orders' REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh' SEGMENT_KEY='' SITE_NAME=localhost diff --git a/.env.test b/.env.test index 2526f82..434fa51 100644 --- a/.env.test +++ b/.env.test @@ -8,7 +8,7 @@ LMS_BASE_URL='http://localhost:18000' LOGIN_URL='http://localhost:18000/login' LOGOUT_URL='http://localhost:18000/logout' MARKETING_SITE_BASE_URL='http://localhost:18000' -ORDER_HISTORY_URL='localhost:1996/orders' +ORDER_HISTORY_URL='http://localhost:1996/orders' REFRESH_ACCESS_TOKEN_ENDPOINT='http://localhost:18000/login_refresh' SEGMENT_KEY=null SITE_NAME=localhost diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7baeb8d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +--- +name: ci +on: + push: + branches: + - master + pull_request: +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 12 + npm-test: + - i18n_extract + - is-es5 + - lint + - test + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm install -g npm@6 + - run: make requirements + - run: make test NPM_TESTS=build + - run: make test NPM_TESTS=${{ matrix.npm-test }} + - name: upload coverage + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: false diff --git a/.gitignore b/.gitignore index 61e9345..4e93143 100755 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ temp/babel-plugin-react-intl ### Emacs ### *~ -/.vscode /temp -/npm-dist +/.vscode /module.config.js diff --git a/.releaserc b/.releaserc deleted file mode 100644 index afb5f33..0000000 --- a/.releaserc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "branch": "master", - "tagFormat": "v${version}", - "verifyConditions": [ - "@semantic-release/npm", - { - "path": "@semantic-release/github", - "assets": { - "path": "npm-dist/*" - } - } - ], - "analyzeCommits": "@semantic-release/commit-analyzer", - "generateNotes": "@semantic-release/release-notes-generator", - "prepare": "@semantic-release/npm", - "publish": [ - "@semantic-release/npm", - { - "path": "@semantic-release/github", - "assets": { - "path": "npm-dist/*" - } - } - ], - "success": [], - "fail": [] -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 00c12bc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: 12 -before_install: -- npm install -g npm@6 -install: -- npm ci -script: -- make validate-no-uncommitted-package-lock-changes -- npm run i18n_extract -- npm run lint -- npm run test -- npm run build -- npm run npm-build -- npm run is-es5 -after_success: -- npx semantic-release -- codecov -env: - global: - # GH_TOKEN - - secure: qvCsyn5Ioj+b/gvX95yaQ+Vha+r60pGxuKFm6HzVbnWJyKAbR1NN8+RpIo0HUD9S5RPEFjLae82bLa2g/syS+D1DU9qF8NYderjy58bjibgrPdC1YOhi2SEY5u6TW6/T88+w9DyfZ6MF883lJi/6uzs24bHE13RguARlO79OeGvHk6SecoJSWe9yq2IHA0wAScKrvS64+AcUWyTDUvkrxHEvupVJs6aJ6EsdPALODLJ7JnXX7Rh+68nyqbezh+ZnumxBPkdCzUNdtO9C0o7JjV6/P1xg9rNre/huWGx4SYndPaPEmoOpWEfyCZw1ub83LHC1HBnE7eRJku/CmiaiaLGSfeU2sCRteBLlSyI5fEOQ4Su2xLu2k+Yuczj4BlIbjr+xC+bNg+WbOF8vj7TL4/YCxOG/8V4nLfDcHFsZDsPoYZyBe9Z5HsS77S5ZrutQ3i/qR+4zfs4X/QfPXfW3MqI7+oGo+PVNPgxI24i2Kwq5+ZUjnmkVnuGC5ZOZMN8aYojEvqdF+u5VALL/YCmXsXysL6BUsqv4kiZJpQEVBG0WPbh0FJH8qiB8OjLGogxkoSrL4Yd++o4fnSAvW1UgARIlJ0iHVf5r/wVei1KCQiFS6mh0Pwq1lM0Vo2SlTCF5UylnV80Hv7XY6Sp9dYi/EaVG1dv4DyJOHnPti1JAM/U= - # NPM_TOKEN - - secure: S6spzx4jJGWqucSwjaSdPEaNWlwzA75FisK+NoLFDY6uU7KIi2dayHiFlSW1C1vl5xQkkosHXJAInSwcnQMCUomCEuD1FFzydXA1/Dn8NmPc35coKR4CX9yJiArRbjZZjboCulrTPUVWHWoPfA7JTnqCDgOnXspgRKy7emzFLXkdn8vuUQcyXmmT/vDfQQjgq/T+DdBbMiradMvlTzxmKydAVeHAZ03A1Z5O6ePnR6IsFv4LgJ/RfGn501jHeTww6HsxfQX27tWLo5AyQ00YjMl9oXfs57n5u+em/ph3Xoc8Pz6wjkMLJ+eYo+xkYjoZ3d+/f+WXPLMBUNz0LpIBs7LcBHhAc2z4N+dce42CTXur/v8ra0BZEnZQsvOakHvox6KisDDlipPqc0yF7MgThbd31fc8QjdVxdh5w7tLH4PJ7QpBUtZwPskDLABKjnrxkxH+BysHADvVaNOBcZMwIA9yHY3GqzpyQ2upcS07h5a+SHx07viuA7hEn14XCtYrM1AHwS0n2sNdinb0qWOCcGOXzl39FU3N6xNueKoH/eIXuqJ7oiUkKBiSP9zApTApPL6nrng0InZhGjzZHOMNePPdin/uIrxk/fp/wqneGTQemCGRkfHdPT0yuIP22bUv/OmDtgNEG9t9hbIZGYgQmG4FTeTQQ7lC5RjmLrn+uWI= diff --git a/Makefile b/Makefile index 3333213..49dc1b6 100755 --- a/Makefile +++ b/Makefile @@ -10,8 +10,19 @@ tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transi # This directory must match .babelrc . transifex_temp = ./temp/babel-plugin-react-intl -requirements: - npm install +NPM_TESTS=build i18n_extract lint test is-es5 + +.PHONY: test +test: $(addprefix test.npm.,$(NPM_TESTS)) ## validate ci suite + +.PHONY: test.npm.* +test.npm.%: validate-no-uncommitted-package-lock-changes + test -d node_modules || $(MAKE) requirements + npm run $(*) + +.PHONY: requirements +requirements: ## install ci requirements + npm ci i18n.extract: # Pulling display strings from .jsx files into .json files... @@ -48,10 +59,3 @@ pull_translations: validate-no-uncommitted-package-lock-changes: # Checking for package-lock.json changes... git diff --exit-code package-lock.json - -npm-build: - rm -rf ./npm-dist - ./node_modules/.bin/fedx-scripts babel src/profile --out-dir npm-dist --source-maps --ignore **/*.test.jsx,**/*.test.js,**/setupTest.js --copy-files - @# --copy-files will bring in everything else that wasn't processed by babel. Remove what we don't want. - @find npm-dist -name '*.test.js*' -delete - @rm -rf ./npm-dist/__mocks__ diff --git a/README.rst b/README.rst index 541099e..e75a471 100755 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release| +|Build Status| |Codecov| |license| frontend-app-profile ==================== @@ -53,11 +53,5 @@ edX /dev/null", "is-es5": "es-check es5 ./dist/*.js", "lint": "fedx-scripts eslint --ext .js --ext .jsx .", @@ -19,15 +17,6 @@ "start": "fedx-scripts webpack-dev-server --progress", "test": "fedx-scripts jest --coverage --passWithNoTests" }, - "files": [ - "/npm-dist" - ], - "husky": { - "hooks": { - "pre-commit": "npm run lint", - "commit-msg": "commitlint -e $GIT_PARAMS" - } - }, "bugs": { "url": "https://github.com/edx/frontend-app-profile/issues" }, @@ -80,7 +69,6 @@ "enzyme-adapter-react-16": "1.15.6", "es-check": "5.2.4", "glob": "7.1.7", - "husky": "7.0.2", "react-test-renderer": "16.14.0", "reactifex": "1.1.1", "redux-mock-store": "1.5.4" diff --git a/public/index.html b/public/index.html index ef65320..e54972e 100755 --- a/public/index.html +++ b/public/index.html @@ -4,9 +4,7 @@ Learner Profile | <%= process.env.SITE_NAME %> - - - +
diff --git a/src/assets/favicon.ico b/src/assets/favicon.ico deleted file mode 100644 index 1380105..0000000 Binary files a/src/assets/favicon.ico and /dev/null differ diff --git a/src/index.jsx b/src/index.jsx index 211ed43..f7b672f 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -25,7 +25,6 @@ import { ProfilePage, NotFoundPage } from './profile'; import configureStore from './data/configureStore'; import './index.scss'; -import './assets/favicon.ico'; subscribe(APP_READY, () => { ReactDOM.render(