tcpasters/.forgejo/workflows/build.yaml
Thorsten Schubert 5a992dde48
All checks were successful
/ build (push) Successful in 2m51s
Custom error pages for nginx
2024-08-20 18:17:36 +02:00

40 lines
1.1 KiB
YAML

on:
push:
paths-ignore:
- "**/*.md"
- "**/*.sh"
- "**/*.sh.in"
- "**/*.yml"
- "contrib/**"
- "oci/**"
env:
CARGO_TERM_COLOR: always
DEBIAN_FRONTEND: noninteractive
jobs:
build:
runs-on: docker
container:
image: betaco.de/mirror/rust:nightly-bookworm-slim
options: --user root
steps:
- name: Determine prerequisites
id: prereq
run: |
echo "install_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
- name: Install node
if: ${{ steps.prereq.outputs.install_node == '1' }}
run: apt-get -qq update && apt-get -qq install -y --no-install-recommends nodejs
- name: Install git
run: apt-get -qq install -y --no-install-recommends git
- name: Install clippy
run: rustup component add clippy
- name: Clone repository
uses: actions/checkout@v4
- name: Build
run: cargo build --workspace --all-targets
- name: Run tests
run: cargo test --workspace
- name: Run clippy
run: cargo clippy --no-deps