Skip to content

Commit

Permalink
Add GitHub Action (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored May 1, 2022
1 parent e3dbac5 commit aad5b98
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Rust

on:
pull_request:
push:
branches: [main]
release:

env:
RUSTFLAGS: -D warnings

jobs:

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- run: cargo fmt --check

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- run: cargo build

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- run: cargo test

bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update nightly && rustup default nightly
- run: cargo bench

publish:
if: github.event_name == 'release'
needs: [fmt, build, test, bench]
runs-on: ubunut-latest
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- run: cargo publish
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

0 comments on commit aad5b98

Please sign in to comment.