Skip to content

Commit 716f97c

Browse files
committed
ci: rewrite the CI using pnpm and node
1 parent fea6cc5 commit 716f97c

1 file changed

Lines changed: 54 additions & 35 deletions

File tree

.github/workflows/CI.yml

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,81 @@ on:
55

66
jobs:
77
Test:
8-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
9-
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
10-
runs-on: ${{ matrix.os }}
8+
runs-on: ubuntu-22.04
9+
name: Build
10+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
1111
strategy:
1212
fail-fast: false
1313
matrix:
1414
os:
15-
- ubuntu-latest
16-
# - macos-latest
17-
# - windows-latest
18-
atom_channel: [stable, beta]
15+
- ubuntu-22.04
16+
node:
17+
- 20
18+
pnpm:
19+
- 8
1920
steps:
2021
- uses: actions/checkout@v3
21-
- uses: UziTech/action-setup-atom@v1
22-
with:
23-
channel: ${{ matrix.atom_channel }}
2422

25-
- name: Install APM dependencies
26-
run: apm install
23+
- name: Cache
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.pnpm-store
28+
D:\.pnpm-store
29+
./node_modules
30+
./.parcel-cache
31+
key: "cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
32+
restore-keys: |
33+
"cache-OS:${{ matrix.os }}-"
2734
28-
- name: Tests
29-
run: npm run test
35+
- name: Setup Node
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: ${{ matrix.node }}
3039

31-
Lint:
32-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
33-
runs-on: ubuntu-latest
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
steps:
37-
- uses: actions/checkout@v3
40+
- name: Setup Pnpm
41+
uses: pnpm/action-setup@v2
3842
with:
39-
fetch-depth: 0
40-
- name: Commit lint ✨
41-
uses: wagoid/commitlint-github-action@v5
43+
version: ${{ matrix.pnpm }}
4244

43-
- name: Install dependencies
44-
run: npm install
45+
- name: Install
46+
run: |
47+
pnpm install
4548
46-
# - name: Format ✨
47-
# run: npm run test.format
49+
- name: Build
50+
run: |
51+
pnpm build
4852
49-
- name: Lint ✨
50-
run: npm run test.lint
53+
- name: Lint
54+
run: |
55+
pnpm run test.lint
56+
pnpm run test.format
57+
58+
- name: Test
59+
run: |
60+
pnpm run test
5161
5262
Release:
53-
needs: [Test, Lint]
63+
needs: [Test]
5464
if: github.ref == 'refs/heads/master' &&
5565
github.event.repository.fork == false
5666
runs-on: ubuntu-latest
5767
steps:
5868
- uses: actions/checkout@v3
59-
- uses: UziTech/action-setup-atom@v1
60-
- uses: actions/setup-node@v3
6169

62-
- name: NPM install
63-
run: npm install
70+
- name: Setup Node
71+
uses: actions/setup-node@v3
72+
with:
73+
node-version: 18
74+
75+
- name: Setup Pnpm
76+
uses: pnpm/action-setup@v2
77+
with:
78+
version: 8
79+
80+
- name: Install
81+
run: |
82+
pnpm install
6483
6584
- name: Release 🎉
6685
uses: cycjimmy/semantic-release-action@v2

0 commit comments

Comments
 (0)