frogbot/.github/workflows/test.yaml
mackrab a18ce046bf
Some checks reported warnings
Test / Cargo check (push) Has been cancelled
Test / Cargo test (push) Has been cancelled
Test / Cargo format (push) Has been cancelled
Test / Cargo clippy (push) Has been cancelled
Test / Cargo check (pull_request) Has been cancelled
Test / Cargo test (pull_request) Has been cancelled
Test / Cargo format (pull_request) Has been cancelled
Test / Cargo clippy (pull_request) Has been cancelled
support for github actions
2023-06-22 18:54:45 +00:00

66 lines
No EOL
1.6 KiB
YAML

name: Test
on: [pull_request, push]
jobs:
check:
name: "Cargo check"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3
- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true
- uses: "actions-rs/cargo@v1"
with:
command: "check"
test:
name: "Cargo test"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3
- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true
- uses: "actions-rs/cargo@v1"
with:
command: "test"
fmt:
name: "Cargo format"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3
- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true
- run: "rustup component add rustfmt"
- uses: "actions-rs/cargo@v1"
with:
command: "fmt"
args: "--all -- --check"
clippy:
name: "Cargo clippy"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3
- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true
- run: "rustup component add clippy"
- uses: "actions-rs/cargo@v1"
with:
command: "clippy"
args: "-- -D warnings"