From e8a77aa4c7352e9097f37c8c5d69ce319e23b7ba Mon Sep 17 00:00:00 2001 From: David Joy Date: Tue, 30 Mar 2021 16:46:08 -0400 Subject: [PATCH] build: switch from travis to github actions for checks (#64) * build: switch from travis to github actions for checks * lint: fixing linting error --- .github/workflows/validate.yml | 21 +++++++++++++++++++ .travis.yml | 13 ------------ Makefile | 14 +++++++++++++ .../discussions/Discussions.jsx | 1 - 4 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/validate.yml delete mode 100755 .travis.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 000000000..4bfaf73a2 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,21 @@ +name: validate +on: +- push +- pull_request +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 12 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: make validate.ci + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 11ea9376a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js -node_js: 12 -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 is-es5 -after_success: -- codecov diff --git a/Makefile b/Makefile index 3c19661b6..cd540b602 100755 --- a/Makefile +++ b/Makefile @@ -52,3 +52,17 @@ pull_translations: validate-no-uncommitted-package-lock-changes: # Checking for package-lock.json changes... git diff --exit-code package-lock.json + +.PHONY: validate +validate: + make validate-no-uncommitted-package-lock-changes + npm run i18n_extract + npm run lint -- --max-warnings 0 + npm run test + npm run build + npm run is-es5 + +.PHONY: validate.ci +validate.ci: + npm ci + make validate diff --git a/src/pages-and-resources/discussions/Discussions.jsx b/src/pages-and-resources/discussions/Discussions.jsx index 1da41d2c0..3bb20b6eb 100644 --- a/src/pages-and-resources/discussions/Discussions.jsx +++ b/src/pages-and-resources/discussions/Discussions.jsx @@ -83,7 +83,6 @@ function Discussions({ courseId, intl }) { // This is a callback that gets called after the form has been submitted successfully. const handleSubmit = useCallback((values) => { - console.log(values); dispatch(saveAppConfig(courseId, selectedAppId, values)).then(() => { history.push(pagesAndResourcesPath); });