Skip to content

refactor(tests): πŸ’‘ Move all tests to a seperate 'tests' directory #54

refactor(tests): πŸ’‘ Move all tests to a seperate 'tests' directory

refactor(tests): πŸ’‘ Move all tests to a seperate 'tests' directory #54

Workflow file for this run

name: 🎑 Continuous Integration
on:
push:
branches: ['main']
pull_request:
branches: ['main']
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: πŸ“š Checkout
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: πŸ’„ Check formatting
run: cargo fmt --check
- name: Create duplication report
run: |
npx jscpd -g -r 'markdown'> output
printf '%s\n\n%s\n' "$(cat report/jscpd-report.md)" "$(cat output)" >> $GITHUB_STEP_SUMMARY
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- name: πŸ“š Checkout
uses: actions/checkout@v4
- name: πŸ”„ Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: πŸ¦€ Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
github_token: ${{ secrets.GH_TOKEN }}
- name: πŸ”§ Build
run: cargo build --verbose
- name: πŸ§ͺ Run tests
run: cargo test --verbose