forked from TaggrNetwork/Taggr
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.41 KB
/
e2e-tests.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
name: e2e Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
e2e_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-nodejs
- uses: ./.github/actions/setup-dfx
- uses: ./.github/actions/setup-build-deps
- name: Get Playwright version
id: playwright-version
run: echo "playwright_version=$(cat package-lock.json | jq -r '.dependencies."@playwright/test".version')" >> $GITHUB_ENV
- name: Cache Playwright dependencies
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.playwright_version }}
- name: Install NPM dependencies
run: npm ci
- name: Install Playwright dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npm run install:e2e
- name: Start DFX
run: dfx start --background
- name: Import local minter
run: ./e2e/import_local_minter.sh
- name: Set up NNS canisters
run: |
dfx extension install nns
dfx nns install
- name: Deploy canister
run: |
dfx canister create --all
make e2e_build
make local_deploy
- name: Run e2e tests
run: npm run test:e2e
- name: Stop DFX
run: dfx stop