build: switch from travis to github actions for checks (#64)

* build: switch from travis to github actions for checks

* lint: fixing linting error
This commit is contained in:
David Joy
2021-03-30 16:46:08 -04:00
committed by GitHub
parent 01208a9f9a
commit e8a77aa4c7
4 changed files with 35 additions and 14 deletions

21
.github/workflows/validate.yml vendored Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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);
});