-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.34 KB
/
python_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
name: python test
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
detect-changes:
uses: ./.github/workflows/check_diff.yml
with:
pattern: ^bindings/\|^test/\|^crates/\|^lib/\|^target/\|^foundry\.toml$\|^Cargo\.lock$\|^Cargo\.toml$\|^\.github/workflows/python_test\.yml$
test:
needs: detect-changes
# Run only if changes are detected
if: needs.detect-changes.outputs.changed == 'true'
name: python test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
# NOTE: This is needed to ensure that hyperdrive-wrappers builds correctly.
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
token: ${{ secrets.GITHUB_TOKEN }}
- name: install requirements
run: |
python -m pip install --upgrade pip
- name: install hyperdrivepy
run: python -m pip install .[all]
- name: run pytest
run: python -m pytest .