fix ci
cargo devel CI / cargo CI (push) Successful in 1m52s Details

This commit is contained in:
Christoph J. Scherr 2024-02-09 18:39:43 +01:00
parent 036c8529dc
commit bbb6ca339c
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
1 changed files with 31 additions and 13 deletions

View File

@ -1,5 +1,9 @@
name: Cargo Check, Format, Fix and Test name: cargo devel CI
on: [push, pull_request] on:
push:
branches:
- '**'
# - '!master'
jobs: jobs:
format: format:
@ -9,18 +13,32 @@ jobs:
# added or changed files to the repository. # added or changed files to the repository.
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - name: get repo
- uses: dtolnay/rust-toolchain@stable uses: actions/checkout@v4
- run: cargo check --all-features --all-targets - name: install rust
- run: rustup component add rustfmt uses: https://github.com/dtolnay/rust-toolchain@stable
- run: cargo fix --all-features --all-targets - name: install additional rust things
- run: cargo fmt --all run: rustup component add rustfmt
- run: cargo test --all-features --all-targets - name: config custom registry
- uses: stefanzweifel/git-auto-commit-action@v5 run: |
mkdir -p ~/.cargo/
echo "" > ~/.cargo/config.toml
echo "[registry]" >> ~/.cargo/config.toml
echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml
echo '[registries.cscherr]' >> ~/.cargo/config.toml
echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml
cat ~/.cargo/config.toml
- name: cargo check
run: cargo check --all-features --all-targets
- name: cargo fix
run: cargo fix --all-features --all-targets
- name: cargo fmt
run: cargo fmt --all
- name: cargo test
run: cargo test --all-features --all-targets
- name: commit back to repository
uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
with: with:
# Optional. Commit message for the created commit. # Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes" # Defaults to "Apply automatic changes"
commit_message: automatic cargo CI changes commit_message: automatic cargo CI changes
commit_user_name: Gitea CI
commit_user_email: noreply@cscherr.de
commit_author: Gitea CI <noreply@cscherr.de>