From 812b83c74cd057756bd54396c83e7bae0dfb5c3e Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Thu, 4 Mar 2021 22:08:37 -0500 Subject: [PATCH] Move from Travis CI to GitHub Actions --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++ .gitignore | 2 -- .travis.yml | 7 ------- package.json | 4 +--- test/integration.js | 15 ++++++-------- yarn.lock | 12 ----------- 6 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..402c7c8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test +on: + push: + pull_request: +env: + FORCE_COLOR: 2 +jobs: + full: + name: Node.js 15 Full + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: 15 + - name: Install dependencies + uses: bahmutov/npm-install@v1 + - name: Run tests + run: yarn test + short: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 14 + - 12 + - 10 + name: Node.js ${{ matrix.node-version }} Quick + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Install Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + uses: bahmutov/npm-install@v1 + - name: Run unit tests + run: npx jest diff --git a/.gitignore b/.gitignore index 2d7141b..dd3d82b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ node_modules/ yarn-error.log - -coverage/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d200e51..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -cache: yarn -node_js: - - node - - "14" - - "12" - - "10" diff --git a/package.json b/package.json index 1f412e9..ad55cde 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "./": "./" }, "scripts": { - "test": "jest && eslint-ci . && ./test/integration.js" + "test": "jest && eslint . && ./test/integration.js" }, "funding": { "type": "opencollective", @@ -37,10 +37,8 @@ }, "devDependencies": { "@logux/eslint-config": "^42.2.0", - "ci-job-number": "^1.2.2", "clean-publish": "^1.1.8", "eslint": "^7.12.1", - "eslint-ci": "^1.0.0", "eslint-config-standard": "^16.0.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.1.0", diff --git a/test/integration.js b/test/integration.js index a5031e4..2c45a9a 100755 --- a/test/integration.js +++ b/test/integration.js @@ -1,16 +1,13 @@ #!/usr/bin/env node let { testOnReal } = require('postcss-parser-tests') -let ciJobNumber = require('ci-job-number') let postcss = require('postcss') let scss = require('../') -if (ciJobNumber() === 1) { - testOnReal(css => - postcss().process(css, { - parser: scss, - map: { annotation: false } - }) - ) -} +testOnReal(css => + postcss().process(css, { + parser: scss, + map: { annotation: false } + }) +) diff --git a/yarn.lock b/yarn.lock index f41a952..f0b6fc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1232,11 +1232,6 @@ ci-info@2.0.0, ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-job-number@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/ci-job-number/-/ci-job-number-0.3.1.tgz#4354e45bb3ed5a7301f09358d2876d510d4a570e" - integrity sha512-OfY2Cg+mTqZz7lWOxONGbAXVZNNWPSiyGtOpAjYHEVTXIae8lGCOg3cDfJpPh8zcl+2CqItOsxbvH6ueV+QOmw== - ci-job-number@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/ci-job-number/-/ci-job-number-1.2.2.tgz#f4e5918fcaeeda95b604f214be7d7d4a961fe0c0" @@ -1802,13 +1797,6 @@ eslint-ast-utils@^1.1.0: lodash.get "^4.4.2" lodash.zip "^4.2.0" -eslint-ci@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-ci/-/eslint-ci-1.0.0.tgz#6bcb238c45d2bf522fad50ad190bc00a206fe2df" - integrity sha512-8Itb/739gpX11nqvWg6kkpge7NwS1o+SkhfFAItfvH9/i5IoY6NLKKKzIagHakT2WmMdnq4HfcymYh/0NGvAVA== - dependencies: - ci-job-number "^0.3.0" - eslint-config-prettier@~6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1"