Compare commits
26 Commits
main
...
a0e6005acd
| Author | SHA1 | Date | |
|---|---|---|---|
| a0e6005acd | |||
| 06708f6038 | |||
| 79d263cbb7 | |||
| cf0d51fca5 | |||
| 7682dc022c | |||
| 763ebea60a | |||
| 3fa9d65966 | |||
| 39391d17a4 | |||
| 563f6dd3e4 | |||
| c7b13c2572 | |||
| c287334af2 | |||
| d6dfe7e525 | |||
| 668e5dbacd | |||
| 3ef2eff8c3 | |||
| e56a40a469 | |||
| f55d57c8ef | |||
| a32e7757c5 | |||
| 2659b641ba | |||
| 8fb226fafd | |||
| 9c97e00d5a | |||
| 7e49f33b95 | |||
| 35bb9081ab | |||
| b98fd1352a | |||
| a27214c8da | |||
| b53c875eac | |||
| 0e92eda123 |
40
.gitea/workflows/checks.yml
Normal file
40
.gitea/workflows/checks.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: checks
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths: &CODE_PATHS
|
||||||
|
- 'src/**'
|
||||||
|
- 'Cargo*'
|
||||||
|
push:
|
||||||
|
paths: *CODE_PATHS
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# TODO(cascode) cache checkout for build and test stages?
|
||||||
|
lint:
|
||||||
|
container: &BUILD_CONTAINER
|
||||||
|
# TODO use communitymedia docker registry
|
||||||
|
image: &BUILDER_IMAGE "cascode/aural-isle-ci:2"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
github-server-url: &GIT_URL "https://code.communitymedia.network"
|
||||||
|
- name: rustfmt
|
||||||
|
run: cargo fmt --check
|
||||||
|
build:
|
||||||
|
container: *BUILD_CONTAINER
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
github-server-url: *GIT_URL
|
||||||
|
- name: build
|
||||||
|
run: cargo build
|
||||||
|
# TODO(cascode) cache builds for test stage
|
||||||
|
test:
|
||||||
|
container: *BUILD_CONTAINER
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
github-server-url: *GIT_URL
|
||||||
|
- name: run unit tests
|
||||||
|
run: cargo test
|
||||||
7
ci/Dockerfile
Normal file
7
ci/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM rust:1.73-alpine3.18
|
||||||
|
|
||||||
|
#install build tooling
|
||||||
|
RUN apk add musl-dev && rustup component add rustfmt
|
||||||
|
|
||||||
|
# install gitea act_runner dependencies
|
||||||
|
RUN apk add nodejs git
|
||||||
@ -2,8 +2,7 @@ use warp::Filter;
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let hello = warp::get()
|
let hello = warp::get().map(|| format!("Hello world!"));
|
||||||
.map(|| format!("Hello world!"));
|
|
||||||
|
|
||||||
warp::serve(hello).run(([127, 0, 0, 1], 5309)).await;
|
warp::serve(hello).run(([127, 0, 0, 1], 5309)).await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user