Skip to content

Commit

Permalink
[Tests] move linting from travis-ci to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 5, 2022
1 parent 25773d7 commit 82bfe75
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
pretest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
with:
skip-ls-check: true
- run: sh install-relevant-react.sh
- run: npx lerna bootstrap
- run: npm run build
- run: npm run pretest

# posttest:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - uses: ljharb/actions/node/install@main
# - run: npm run build
# - run: npm run posttest
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_script:
- 'nvm exec node sh install-relevant-react.sh'
- 'if [ -n "${KARMA-}" ]; then export CHROME_BIN=chromium-browser; export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi'
script:
- 'if [ -n "${LINT-}" ]; then npm run lint; elif [ -n "${KARMA-}" ]; then npm run test:karma -- --single-run; elif [ -n "${REACT-}" ]; then npm run travis; else false ; fi'
- 'if [ -n "${KARMA-}" ]; then npm run test:karma -- --single-run; elif [ -n "${REACT-}" ]; then npm run travis; else false ; fi'
after_script:
- 'if [ -n "${REACT-}" ] && [ "${TRAVIS_ALLOW_FAILURE}" != true ]; then case "${TRAVIS_NODE_VERSION}" in "8" | "6") ;; *) cat ./coverage/lcov.info | ./node_modules/.bin/coveralls ;; esac ; fi'
- 'if [ -n "${REACT-}" ] && [ "${TRAVIS_ALLOW_FAILURE}" != true ]; then bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi'
Expand All @@ -36,9 +36,6 @@ matrix:
- 'npx lerna bootstrap'
script:
- 'npx lerna run build'
- node_js: "lts/gallium"
env: LINT=true
stage: test
- node_js: "8"
env: REACT=16
stage: test
Expand Down

0 comments on commit 82bfe75

Please sign in to comment.