ci: move to github actions (#61)

This commit is contained in:
Bernardo Meurer 2020-04-13 13:15:46 -07:00 committed by GitHub
parent 9de2383712
commit d88b4520f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

84
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,84 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: '* * * * 0'
jobs:
checks:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- 1.40.0
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt -y install libsdl2-dev
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
tests:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- 1.40.0
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt -y install libsdl2-dev
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt -y install libsdl2-dev
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy, rustfmt
override: true
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps
- name: Cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --tests -- -D warnings