Skip to content

Commit

Permalink
add CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cookiephone committed Aug 9, 2023
1 parent 182dd14 commit 93cdb62
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: format

on:
pull_request:
branches:
- master
push:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
format:
name: format
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- name: run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
33 changes: 33 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: lint

on:
pull_request:
branches:
- master
push:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: clippy output
36 changes: 36 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test

on:
pull_request:
branches:
- master
push:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: install tarpaulin
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-tarpaulin
- name: run tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --coveralls ${{ secrets.COVERALLS_TOKEN }}

0 comments on commit 93cdb62

Please sign in to comment.