-
Notifications
You must be signed in to change notification settings - Fork 26
89 lines (86 loc) · 2.52 KB
/
test.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
83
84
85
86
87
88
89
name: test
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.78.0
jobs:
rust:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v1.0.0-alpha.0
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
# ts:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 20.x
# - uses: actions/cache@v4
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-
# - run: corepack enable pnpm
# - uses: pnpm/action-setup@v4
# id: pnpm-install
# with:
# version: 9.7.0
# run_install: false
# - run: pnpm install --frozen-lockfile
# - run: pnpm test:ci --coverage
# - uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: coverage/lcov.info
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.7.0
run_install: false
- run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: pnpm example:next e2e:deps
- name: Run Playwright tests
run: |
cat <<EOF >examples/starknet-react-next/.env
BRANCH_NAME=${{ github.head_ref }}
EOF
pnpm e2e:ci
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30