-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) Β· 1.81 KB
/
Copy pathCI-testing-method-rs.yml
File metadata and controls
60 lines (48 loc) Β· 1.81 KB
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
name: Run Tests on Implementation in Rust π¦
on:
push:
branches: main
paths: ["method-rs/**", "tests/**", "scripts/**", ".github/workflows/**"]
pull_request:
branches: main
paths: ["method-rs/**", "tests/**", "scripts/**", ".github/workflows/**"]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust π¦ (stable)
# actions-rs/toolchain@v1 is now deprecated
uses: dtolnay/rust-toolchain@stable
- name: π₯ Install dependencies
run: |
chmod +x setup-py.sh
sudo ./setup-py.sh
rustup component add rustfmt
- name: β
Run tests
working-directory: ./method-rs
run: |
chmod +x check.sh
./check.sh 2>&1 | tee tests_results.txt
- name: πΌοΈ Generate Images
run: |
chmod +x image-generator.sh
./image-generator.sh -rs --all
- name: π¦ Prepare artifact directory
if: always()
run: |
mkdir -p upload/tests-out
cp ./method-rs/tests_results.txt upload || echo "ERROR"
cp ./method-rs/coding_style.txt upload || echo "No file for coding style errors"
cp -r tests-out/method-rs/* upload/tests-out || echo "ERROR"
cp -r images/ upload || echo "ERROR"
# Rename file extension: "out-method-rs.png" -> "out.png"
find . -type f -iname "*out-method-rs.png" -exec bash -c 'for f; do mv "$f" "${f/out-method-rs.png/out.png}"; done' _ {} + || echo "ERROR"
- name: πΎ Upload test logs as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: checker-logs
path: upload
retention-days: 7