ci: Replace travis with GitHub actions

This commit is contained in:
Jonas Platte 2021-04-26 18:59:11 +02:00
parent ce665d213f
commit d235957f94
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
3 changed files with 58 additions and 7 deletions

30
.github/workflows/nightly.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Rust Nightly
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rustfmt, clippy
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Catch common mistakes
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets -- -D warnings

28
.github/workflows/stable.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Rust Stable
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Run tests (unstable-pre-spec)
uses: actions-rs/cargo@v1
with:
command: test
args: --features unstable-pre-spec

View File

@ -1,7 +0,0 @@
language: rust
sudo: false
rust:
- stable
- nightly
script:
- cargo test --features unstable-pre-spec