1- name : Build/Test oxidizr
1+ name : CI (Push)
22
33on :
44 push :
@@ -11,85 +11,34 @@ concurrency:
1111 cancel-in-progress : true
1212
1313jobs :
14- test :
15- name : Build/Test oxidizr
16- runs-on : ubuntu-latest
17- steps :
18- - name : Check out code
19- uses : actions/checkout@v4
20- with :
21- fetch-depth : 0
22-
23- - name : Setup Rust
24- run : |
25- sudo apt-get update
26- sudo apt-get install -y build-essential
27- sudo snap install --classic rustup
28- rustup default stable
29-
30- - name : Build oxidizr
31- run : |
32- cargo build
14+ lint :
15+ name : Lint
16+ uses : ./.github/workflows/_lint.yml
3317
34- - name : Run tests
35- run : |
36- cargo test -- --show-output
37-
38- define-matrix :
39- name : Define spread matrix
40- runs-on : ubuntu-24.04
41- outputs :
42- suites : ${{ steps.suites.outputs.suites }}
43- steps :
44- - name : Checkout
45- uses : actions/checkout@v4
46-
47- - name : Setup Go
48- uses : actions/setup-go@v5
49-
50- - name : Install
51- run : |
52- go install github.com/snapcore/spread/cmd/spread@latest
18+ test :
19+ name : Test
20+ uses : ./.github/workflows/_test.yml
5321
54- - name : Generate matrix list
55- id : suites
56- run : |
57- list="$(spread -list lxd | jq -r -ncR '[inputs | select(length>0)]')"
58- echo "suites=$list"
59- echo "suites=$list" >> $GITHUB_OUTPUT
22+ spread-matrix :
23+ name : Spread Matrix
24+ uses : ./.github/workflows/_spread-matrix.yml
6025
6126 spread-tests :
62- name : Spread (${{ matrix.test }})
63- runs-on : ubuntu-24.04
27+ name : Spread tests
28+ uses : ./.github/workflows/_spread.yml
6429 needs :
6530 - test
66- - define-matrix
67- strategy :
68- fail-fast : false
69- matrix :
70- test : ${{ fromJSON(needs.define-matrix.outputs.suites) }}
71- steps :
72- - name : Checkout
73- uses : actions/checkout@v4
74-
75- - name : Setup Go
76- uses : actions/setup-go@v5
77- with :
78- go-version : " 1.23.0"
79-
80- - name : Install
81- run : |
82- go install github.com/snapcore/spread/cmd/spread@latest
83-
84- - name : Setup LXD
85- 86-
87- - name : Run integration tests
88- run : |
89- spread -v "${{ matrix.test }}"
31+ - lint
32+ - spread-matrix
33+ with :
34+ tests : spread-matrix.outputs.tests
9035
9136 snap :
9237 name : Build snap
38+ needs :
39+ - test
40+ - lint
41+ - spread-tests
9342 strategy :
9443 matrix :
9544 include :
0 commit comments