|
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | 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]') }} |
11 | 11 | strategy: |
12 | 12 | fail-fast: false |
13 | 13 | matrix: |
14 | 14 | 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 |
19 | 20 | steps: |
20 | 21 | - uses: actions/checkout@v3 |
21 | | - - uses: UziTech/action-setup-atom@v1 |
22 | | - with: |
23 | | - channel: ${{ matrix.atom_channel }} |
24 | 22 |
|
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 }}-" |
27 | 34 |
|
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 }} |
30 | 39 |
|
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 |
38 | 42 | with: |
39 | | - fetch-depth: 0 |
40 | | - - name: Commit lint ✨ |
41 | | - uses: wagoid/commitlint-github-action@v5 |
| 43 | + version: ${{ matrix.pnpm }} |
42 | 44 |
|
43 | | - - name: Install dependencies |
44 | | - run: npm install |
| 45 | + - name: Install |
| 46 | + run: | |
| 47 | + pnpm install |
45 | 48 |
|
46 | | - # - name: Format ✨ |
47 | | - # run: npm run test.format |
| 49 | + - name: Build |
| 50 | + run: | |
| 51 | + pnpm build |
48 | 52 |
|
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 |
51 | 61 |
|
52 | 62 | Release: |
53 | | - needs: [Test, Lint] |
| 63 | + needs: [Test] |
54 | 64 | if: github.ref == 'refs/heads/master' && |
55 | 65 | github.event.repository.fork == false |
56 | 66 | runs-on: ubuntu-latest |
57 | 67 | steps: |
58 | 68 | - uses: actions/checkout@v3 |
59 | | - - uses: UziTech/action-setup-atom@v1 |
60 | | - - uses: actions/setup-node@v3 |
61 | 69 |
|
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 |
64 | 83 |
|
65 | 84 | - name: Release 🎉 |
66 | 85 | uses: cycjimmy/semantic-release-action@v2 |
|
0 commit comments