build: upgrade kemitix/rust v3
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 13s
Test / build (map[name:stable]) (push) Successful in 14s
Release Please / Release-plz (push) Successful in 9s
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Paul Campbell 2024-12-03 06:46:50 +00:00 committed by Paul Campbell
parent a7083e2e7e
commit 95b0a6dd40
5 changed files with 67 additions and 22 deletions

View file

@ -0,0 +1,38 @@
name: Release Please
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
release-plz:
name: Release-plz
runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v3.0.0
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run release-plz release-pr
run: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
run: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

View file

@ -1,10 +1,13 @@
name: Rust name: Test
on: on:
push: push:
branches: ["next"] branches:
- next
pull_request: pull_request:
branches: ["main"] branches:
- main
workflow_dispatch:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -12,7 +15,11 @@ env:
jobs: jobs:
build: build:
runs-on: docker runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v3.0.0
strategy: strategy:
matrix: matrix:
toolchain: toolchain:
@ -23,30 +30,27 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Format - name: Check TODOs
uses: https://git.kemitix.net/kemitix/rust@v2.6.0 uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.3.0
with:
args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check
# - name: Machete - name: Machete
# uses: https://github.com/bnjbvr/cargo-machete@v0.6.2 run: cargo +${{ matrix.toolchain.name }} machete
- name: Format
run: cargo +${{ matrix.toolchain.name }} fmt --all --check
- name: Clippy - name: Clippy
uses: https://git.kemitix.net/kemitix/rust@v2.6.0 run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset clippy
with:
args: ${{ matrix.toolchain.name }} cargo clippy
- name: Build - name: Build
uses: https://git.kemitix.net/kemitix/rust@v2.6.0 run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset build
with:
args: ${{ matrix.toolchain.name }} cargo build
- name: Test - name: Test
uses: https://git.kemitix.net/kemitix/rust@v2.6.0 run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset test
with:
args: ${{ matrix.toolchain.name }} cargo test --no-fail-fast
- name: Integration - name: Integration
uses: https://git.kemitix.net/kemitix/rust@v2.6.0 run: ./test.sh
with:
args: ./test.sh - name: Mutations
run: cargo +${{ matrix.toolchain.name }} mutants -vV --in-place

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/target /target
mutants-out*/
dist/ dist/
input.txt input.txt

View file

@ -15,3 +15,4 @@ exclude = [".cargo_home"]
[dependencies] [dependencies]
clap = { version = "4.5", features = ["derive"] } clap = { version = "4.5", features = ["derive"] }
mutants = "0.0"

View file

@ -1,6 +1,7 @@
use clap::Parser; use clap::Parser;
use skip::{skip, Cli, Result}; use skip::{skip, Cli, Result};
#[cfg_attr(test, mutants::skip)]
fn main() -> Result<()> { fn main() -> Result<()> {
let cli = Cli::parse(); let cli = Cli::parse();
let mut stdout = std::io::stdout(); let mut stdout = std::io::stdout();