ripgrep-all/.github/workflows/ci.yml

76 lines
1.7 KiB
YAML
Raw Normal View History

2022-12-25 18:02:32 +00:00
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
#
# While our "example" application has the platform-specific code,
# for simplicity we are compiling and testing everything on the Ubuntu environment only.
# For multi-OS testing see the `cross.yml` workflow.
on: [push, pull_request]
2020-05-19 09:10:11 +00:00
name: ci
2022-12-25 18:02:32 +00:00
2020-05-19 09:10:11 +00:00
jobs:
2022-12-25 18:02:32 +00:00
check:
name: Check
runs-on: ubuntu-latest
2020-05-19 09:10:11 +00:00
steps:
2022-12-25 18:02:32 +00:00
- name: Checkout sources
uses: actions/checkout@v2
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
2020-05-19 09:10:11 +00:00
2022-12-25 18:02:32 +00:00
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings