Skip to content

CI

CI #2088

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: install
run: |
rustup override set stable
rustup update stable
- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
- name: run tests
run: cargo test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: install
run: |
rustup override set stable
rustup update stable
rustup component add rustfmt
- run: cargo fmt -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: install
run: |
rustup override set stable
rustup update stable
rustup component add clippy
- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --locked -- -D warnings
docker:
runs-on: ubuntu-latest
env:
# Heroku doesn't support docker buildkit, so we have to ensure
# that the build works without it.
DOCKER_BUILDKIT: 0
steps:
- uses: actions/checkout@v4
- name: build docker image via docker-compose
run: docker compose build web
- name: start webserver
run: docker compose up web --wait
- name: test HTTP request
run: |
sudo apt-get install -y curl
curl \
--fail \
--show-error \
--connect-timeout 10 \
http://localhost:8000/ht
- name: stop webserver
run: docker compose down