Skip to content

fix: default argument #29

fix: default argument

fix: default argument #29

Workflow file for this run

name: Test/Tag
on:
pull_request:
push:
branches:
- main
jobs:
clippy:
if: ${{ !startsWith(github.event.head_commit.message, 'tag') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-11 # Fixed so that it can be cached
profile: minimal
components: clippy
override: true
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all
test:
if: ${{ !startsWith(github.event.head_commit.message, 'tag') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-11 # Fixed so that it can be cached
override: true
components: llvm-tools-preview
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Install Grcov
run: cargo install grcov
- name: Run tests
run: cargo test --all --no-fail-fast
env:
RUSTFLAGS: '-C instrument-coverage'
LLVM_PROFILE_FILE: 'report-%p-%m.profraw'
- name: Run grcov
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore 'target/**' --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
tag:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- test
- clippy
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0' # https://github.com/actions/checkout/issues/217
token: ${{ secrets.CI_TOKEN }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-11 # Fixed so that it can be cached
profile: minimal
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Install bump tool
run: cargo install cargo-workspaces
- name: Tag
run: |
SEM_VER=$(.github/semver.sh)
cargo workspaces version $SEM_VER -y --no-git-commit
version=`grep '^version = ' Cargo.toml | sed 's/version = //; s/\"//; s/\"//'`
git config --global user.email "gabimtme@gmail.com"
git config --global user.name "Automatic bumper"
git add .
git commit -m "tag: v$version"
git tag "v$version"
git push
git push --tags