From 9e6d8a44b4fcdbb2f390660ae8c2819f6c3cc0db Mon Sep 17 00:00:00 2001 From: Daniel Burgener Date: Thu, 12 Dec 2024 08:49:12 -0500 Subject: [PATCH] Migrate travis CI to github actions CI --- .github/workflows/test.yaml | 53 +++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ----------- 2 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5f26128 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,53 @@ +name: Test + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - nightly + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + - name: Build + run: cargo build + - name: Test + run: cargo test + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt clippy + - name: Run rustfmt check + run: cargo fmt --all -- --check + - name: Run clippy + run: cargo clippy --all --all-targets -- -D warnings + + all-features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly # The bench feature requires nightly + - name: Test all features + run: cargo test --all-features + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 740f724..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: rust -rust: - - stable - - nightly -script: - - | - if [[ $TRAVIS_RUST_VERSION == *stable* ]] - then - rustup component add rustfmt - cargo fmt --version - cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false) - fi - - cargo test - - | - [ $TRAVIS_RUST_VERSION != nightly ] || - cargo test --all-features