This commit is contained in:
DavidOnTop 2025-02-27 17:47:53 +01:00
parent f4ee184734
commit 4c51adb903
Signed by: DavidOnTop
GPG key ID: 8D3E9A75E3E13D89
3 changed files with 106 additions and 15 deletions

58
.github/workflows/release.yaml vendored Normal file
View file

@ -0,0 +1,58 @@
name: CI
on:
push:
branches:
- 'main'
- 'feat/*'
pull_request:
branches:
- 'main'
- 'feat/*'
env:
CARGO_TERM_COLOR: always
jobs:
{%- if ci-tests %}
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Run cargo test
run: cargo test
{%- endif %}
{% if ci-clippy %}
clippy_check:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings
{%- endif %}
{% if ci-fmt %}
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
{%- endif -%}