Skip to content

Commit

Permalink
Add github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Emerentius committed Dec 2, 2023
1 parent be22d50 commit e2e7296
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 10 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,61 @@
name: Run Tests

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

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: pinned # don't rename
os: ubuntu-latest
rust: 1.51.0

- build: beta
os: ubuntu-latest
rust: beta

- build: nightly
os: ubuntu-latest
rust: nightly

steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
if: ${{ matrix.build }} != "pinned"
- name: Install Rust With Components
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
if: ${{ matrix.build }} == "pinned"

- uses: actions/checkout@v4

- name: check formatting
run: cargo fmt --check
if: ${{ matrix.build }} == "pinned"

- name: check code
run: cargo check --verbose

- name: check clippy
run: cargo clippy --verbose
if: ${{ matrix.build }} == "pinned"

- name: run tests
run: cargo test --verbose

- name: Interactive debug
uses: mxschmitt/action-tmate@v3
if: failure() && github.event_name == 'workflow_dispatch'
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

0 comments on commit e2e7296

Please sign in to comment.