Skip to content

Commit

Permalink
ci: add linter + tests + build on pull requests and push
Browse files Browse the repository at this point in the history
  • Loading branch information
pythcoiner committed Jan 3, 2025
1 parent d222244 commit 761ece3
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.82.0
components: rustfmt, clippy
override: true
- name: rustfmt
run: cargo fmt -- --check
- name: clippy
run: cargo clippy --all-features --all-targets -- -D warnings

tests:
needs: linter
strategy:
matrix:
toolchain:
- 1.75
- nightly
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: tests
run: cargo test --verbose --color always -- --nocapture
build:
needs: tests
strategy:
matrix:
toolchain:
- 1.75
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: tests
run: cargo build --release

0 comments on commit 761ece3

Please sign in to comment.