-
Notifications
You must be signed in to change notification settings - Fork 4
82 lines (76 loc) · 2.19 KB
/
ci-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
build-lint-test:
name: Build, Lint, and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Enable Corepack and set Yarn version
run: |
corepack enable
corepack prepare [email protected] --activate
- name: Install dependencies without immutable
run: yarn install --no-immutable
- name: Verify dependencies with immutable
run: |
set +e
yarn install --immutable
if [[ $? -ne 0 ]]; then
echo "Lockfile would be modified, skipping --immutable check"
fi
- run: yarn build
# - run: yarn lint
# - run: yarn test
- name: Cache snap build
if: ${{ matrix.node-version == '18.x' }}
uses: actions/cache@v3
with:
path: ./packages/snap/dist
key: snap-${{ runner.os }}-${{ github.sha }}
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.yarn-cache
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
# e2e:
# name: End-to-end Tests
# runs-on: ubuntu-latest
# needs:
# - build-lint-test
# steps:
# - uses: actions/checkout@v3
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version-file: '.nvmrc'
# cache: 'yarn'
# - name: Restore snap build cache
# uses: actions/cache@v3
# with:
# path: ./packages/snap/dist
# key: snap-${{ runner.os }}-${{ github.sha }}
# - run: yarn install --immutable
# - name: Install Google Chrome
# run: yarn install-chrome
# - name: Run e2e tests
# run: yarn workspace @polkagate/snap run test
all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-latest
needs:
- build-lint-test
# - e2e
steps:
- run: echo "Great success!"