Skip to content

Commit

Permalink
Move from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 5, 2021
1 parent 1c1c262 commit 812b83c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 33 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules/
yarn-error.log

coverage/
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"./": "./"
},
"scripts": {
"test": "jest && eslint-ci . && ./test/integration.js"
"test": "jest && eslint . && ./test/integration.js"
},
"funding": {
"type": "opencollective",
Expand All @@ -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",
Expand Down
15 changes: 6 additions & 9 deletions test/integration.js
Original file line number Diff line number Diff line change
@@ -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 }
})
)
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 812b83c

Please sign in to comment.