Skip to content

Commit

Permalink
Switch from Travis to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
ttiurani committed Apr 12, 2023
1 parent cb0cbd9 commit 8a55cc7
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 2 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: 'CI'
on:
pull_request:
push:
branches:
- master

env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always

jobs:
ci-pass:
name: CI is green
runs-on: ubuntu-latest
needs:
- test-linux
- test-windows
- test-macos
- build-extra
- lint
steps:
- run: exit 0

test-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run tests
run: |
cargo check
cargo test
test-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run tests
run: |
cargo check
cargo test
test-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run tests
run: |
cargo check
cargo test
build-extra:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Build WASM
run: |
cargo build --target=wasm32-unknown-unknown
- name: Build benches
run: |
cargo build --benches
- name: Build release
run: |
cargo build --release
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Format check
run: |
cargo fmt -- --check
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ $ cargo add random-access-storage

[1]: https://img.shields.io/crates/v/random-access-storage.svg?style=flat-square
[2]: https://crates.io/crate/random-access-storage
[3]: https://img.shields.io/travis/datrs/random-access-storage.svg?style=flat-square
[4]: https://travis-ci.org/datrs/random-access-storage
[3]: https://github.com/datrs/random-access-storage/actions/workflows/ci.yml/badge.svg
[4]: https://github.com/datrs/random-access-storage/actions
[5]: https://img.shields.io/crates/d/random-access-storage.svg?style=flat-square
[6]: https://crates.io/crates/random-access-storage
[7]: https://docs.rs/random-access-storage/badge.svg
Expand Down

0 comments on commit 8a55cc7

Please sign in to comment.