Skip to content

Commit

Permalink
Use github actions instead of travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Varlakov committed Dec 29, 2021
1 parent dcc2086 commit a7adb05
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 21 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 5 * * *'
workflow_call:

name: Continuous Integration

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- uses: Swatinem/rust-cache@v1

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --tests

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- uses: Swatinem/rust-cache@v1

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

test-release:
name: Test Suite Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- uses: Swatinem/rust-cache@v1

- name: Run cargo test --release
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 nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

0 comments on commit a7adb05

Please sign in to comment.