-
Notifications
You must be signed in to change notification settings - Fork 56
69 lines (62 loc) · 1.82 KB
/
hydra.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
name: Hydra backend test
on:
push:
branches: [main]
pull_request:
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
test-hydra:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- uses: actions/checkout@v3
- name: Set up Python 3.10.14
uses: actions/setup-python@v2
with:
python-version: 3.10.14
- name: Install dependencies
run: make setup
- name: Check Black formatting
run: source venv/bin/activate && black --check .
- name: Test garaga_rs
run: |
source venv/bin/activate
(cd tools/garaga_rs && cargo fmt --check && cargo test)
- name: Run pytest
run: |
source venv/bin/activate
pytest -n auto
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
- name: Run make rewrite and check for unstaged changes
run: |
source venv/bin/activate
if ! make rewrite; then
echo "Error: 'make rewrite' command failed"
exit 1
fi
if [[ -n $(git status --porcelain) ]]; then
echo "Error: Unstaged changes detected after running 'make rewrite'"
git status
exit 1
fi