2023-10-21 04:15:35 -04:00
|
|
|
name: checks
|
|
|
|
on:
|
2023-10-21 16:20:41 -04:00
|
|
|
pull_request:
|
2023-10-21 17:12:12 -04:00
|
|
|
paths: &CODE_PATHS
|
2023-10-21 16:50:21 -04:00
|
|
|
- 'src/**'
|
|
|
|
- 'Cargo*'
|
2023-10-21 16:20:41 -04:00
|
|
|
push:
|
2023-10-21 17:12:12 -04:00
|
|
|
paths: *CODE_PATHS
|
2023-10-21 16:20:41 -04:00
|
|
|
branches:
|
|
|
|
- main
|
2023-10-21 04:15:35 -04:00
|
|
|
|
|
|
|
jobs:
|
2023-10-21 16:54:28 -04:00
|
|
|
# TODO(cascode) cache checkout for build and test stages?
|
|
|
|
lint:
|
2023-10-21 17:14:27 -04:00
|
|
|
container:
|
|
|
|
# TODO use communitymedia docker registry
|
|
|
|
image: "cascode/aural-isle-ci:0"
|
2023-10-21 16:54:28 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
2023-10-21 17:11:49 -04:00
|
|
|
github-server-url: "https://code.communitymedia.network"
|
2023-10-21 16:54:28 -04:00
|
|
|
- name: rustfmt
|
|
|
|
run: cargo fmt --check
|
2023-10-21 15:40:59 -04:00
|
|
|
build:
|
2023-10-21 17:14:27 -04:00
|
|
|
container:
|
|
|
|
# TODO use communitymedia docker registry
|
|
|
|
image: "cascode/aural-isle-ci:2"
|
2023-10-21 15:40:59 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
2023-10-21 17:11:49 -04:00
|
|
|
github-server-url: "https://code.communitymedia.network"
|
2023-10-21 15:40:59 -04:00
|
|
|
- name: build
|
|
|
|
run: cargo build
|
|
|
|
# TODO(cascode) cache builds for test stage
|
|
|
|
test:
|
2023-10-21 17:14:27 -04:00
|
|
|
container:
|
|
|
|
# TODO use communitymedia docker registry
|
|
|
|
image: "cascode/aural-isle-ci:2"
|
2023-10-21 15:40:59 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
2023-10-21 17:11:49 -04:00
|
|
|
github-server-url: "https://code.communitymedia.network"
|
2023-10-21 15:40:59 -04:00
|
|
|
- name: run unit tests
|
|
|
|
run: cargo test
|