Skip to content

Commit

Permalink
Swich to GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 4, 2022
1 parent 80c08ac commit 18625a6
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 15 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Cargo

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Build & Test
strategy:
matrix:
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: sudo apt-get -y install xorg-dev
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
env:
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
- name: Run tests
uses: gabrielbb/xvfb-action@v1
with:
run: cargo test --all --lib --verbose

docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get -y install xorg-dev
- uses: actions/checkout@v2
- name: Docs
run: cargo doc --all
env:
RUSTDOCFLAGS: -D warnings

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get -y install xorg-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
profile: minimal
components: clippy, rustfmt
override: true
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --tests
env:
RUSTFLAGS: -D warnings
- name: Check formating
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

0 comments on commit 18625a6

Please sign in to comment.