-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.42 KB
/
build.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
name: Build
on:
push:
branches: [main]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'ci-scripts/**'
- '.github/workflows/build.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'ci-scripts/**'
- '.github/workflows/build.yml'
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Set executable permissions for CI scripts
run: |
chmod +x ci-scripts/format.sh
chmod +x ci-scripts/lint.sh
chmod +x ci-scripts/test.sh
chmod +x ci-scripts/build.sh
- name: Format code
run: ./ci-scripts/format.sh
- name: Run linter
run: ./ci-scripts/lint.sh
- name: Run tests
run: ./ci-scripts/test.sh
- name: Build release
run: ./ci-scripts/build.sh
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: stackql-deploy
# path: target/release/stackql-deploy