Skip to content

Commit 1affe93

Browse files
committed
ci: Add GitHub Actions CI file
1 parent 9d29a66 commit 1affe93

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/minsc.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
Test:
11+
runs-on: ubuntu-22.04
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
steps:
16+
- name: 📥 Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: 🗄️ Cache
20+
uses: actions/cache@v4
21+
with:
22+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
23+
path: |
24+
~/.cargo/registry
25+
~/.cargo/git
26+
target
27+
28+
- name: 🐛 Check for errors
29+
run: cargo check --all-features
30+
31+
- name: 🧹 Check formatting
32+
run: cargo fmt -- --check
33+
34+
- name: 📎 Check with Clippy
35+
run: cargo clippy --all-targets --all-features
36+
37+
- name: 🔨 Build
38+
run: cargo build --release
39+
40+
- name: 🧪 Run tests
41+
run: MINSC_EXE=target/release/minsc ./tests/test.sh
42+
43+
- name: 📖 Run examples
44+
run: MINSC_EXE=target/release/minsc ./tests/test.sh examples
45+
46+
- name: 📦 Prepare artifacts
47+
run: strip target/release/minsc
48+
49+
- name: 📤️ Upload artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: minsc
53+
path: target/release/minsc

0 commit comments

Comments
 (0)