Skip to content

Commit

Permalink
Add github actions CI and remove travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed May 28, 2024
1 parent bc0c342 commit 57e635f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 31 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Build and test
on:
- push
# Build if requested manually from the Actions tab
- workflow_dispatch

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
default: true
- name: Check formatting
run: cargo fmt -- --check

# Enable this after fixing all the stuff clippy complains about
# linting:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# components: clippy
# default: true
# - name: Lint (clippy)
# uses: actions-rs/clippy-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}

build-and-test:
strategy:
matrix:
rust: [stable, beta, nightly, 1.60.0]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
default: true

- name: Build
run: cargo build --all-targets

- name: Test
run: cargo test
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

0 comments on commit 57e635f

Please sign in to comment.