Skip to content

Commit 666c300

Browse files
committed
Move from Travis CI to GitHub Actions
1 parent 1b9e4c3 commit 666c300

File tree

3 files changed

+76
-7
lines changed

3 files changed

+76
-7
lines changed

.github/workflows/test.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Test
2+
on:
3+
push:
4+
pull_request:
5+
jobs:
6+
full:
7+
name: Node.js 17 Full
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout the repository
11+
uses: actions/checkout@v2
12+
- name: Install pnpm
13+
uses: pnpm/action-setup@v2
14+
with:
15+
version: latest
16+
- name: Install Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 17
20+
cache: pnpm
21+
- name: Install dependencies
22+
run: pnpm install --frozen-lockfile --ignore-scripts
23+
- name: Run tests
24+
run: pnpm test
25+
env:
26+
FORCE_COLOR: 2
27+
short:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
node-version:
32+
- 16
33+
- 14
34+
- 12
35+
name: Node.js ${{ matrix.node-version }} Quick
36+
steps:
37+
- name: Checkout the repository
38+
uses: actions/checkout@v2
39+
- name: Install pnpm
40+
uses: pnpm/action-setup@v2
41+
with:
42+
version: latest
43+
- name: Install Node.js ${{ matrix.node-version }}
44+
uses: actions/setup-node@v2
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
cache: pnpm
48+
- name: Install dependencies
49+
run: pnpm install --frozen-lockfile --ignore-scripts
50+
- name: Run unit tests
51+
run: pnpm unit
52+
env:
53+
FORCE_COLOR: 2
54+
old:
55+
runs-on: ubuntu-latest
56+
name: Node.js 10 Quick
57+
steps:
58+
- name: Checkout the repository
59+
uses: actions/checkout@v2
60+
- name: Install pnpm
61+
uses: pnpm/action-setup@v1
62+
with:
63+
version: 3
64+
env:
65+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
66+
- name: Install Node.js 10
67+
uses: actions/setup-node@v2
68+
with:
69+
node-version: 10
70+
- name: Install dependencies
71+
run: pnpm install --frozen-lockfile --ignore-scripts
72+
- name: Run unit tests
73+
run: pnpm unit
74+
env:
75+
FORCE_COLOR: 2

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"license": "MIT",
1616
"repository": "postcss/postcss-js",
1717
"scripts": {
18+
"unit": "jest",
1819
"test": "jest --coverage && eslint ."
1920
},
2021
"engines": {

0 commit comments

Comments
 (0)