aural_isle/.gitea/workflows/checks.yml

45 lines
1.1 KiB
YAML
Raw Normal View History

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:
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:
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:
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:
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:
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:
github-server-url: "https://code.communitymedia.network"
2023-10-21 15:40:59 -04:00
- name: run unit tests
run: cargo test