-
-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (69 loc) · 2.04 KB
/
test.yaml
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
name: CI
on:
push:
pull_request:
branches: ["main"]
concurrency:
# Cancel older, in-progress jobs from the same PR, same workflow.
# use run_id if the job is triggered by a push to ensure
# push-triggered jobs to not get canceled.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# TODO: Figure out why this isn't working.
# with:
# ref: ${{ github.head_ref }}
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --check **/*.{js,md,tsx,ts}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ApeWorX/github-action@v3
with:
python-version: "3.11"
- run: ape compile --force --size
# Upload ape build files for testing
- uses: actions/upload-artifact@v4
with:
name: ape-build-folder
path: .build/
overwrite: true # Always write it
if-no-files-found: error # Do not proceed unless build is cached
include-hidden-files: true # Because it's a "hidden" folder
py-test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: foundry-rs/foundry-toolchain@v1
- uses: ApeWorX/github-action@v3
with:
python-version: "3.11"
# Ape-built artifacts used for testing
- uses: actions/download-artifact@v4
with:
name: ape-build-folder
path: .build/
- run: pip install .
- run: ape test -s
js-test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
# Ape-built artifacts used for testing
- uses: actions/download-artifact@v4
with:
name: ape-build-folder
path: .build/
- run: npm install .
- run: npm run build --workspaces --if-present