From 6bd2ae57d78f63c460f6cbb46de362e764a9f1d8 Mon Sep 17 00:00:00 2001 From: Evgeny Prilepin Date: Sat, 12 Oct 2024 23:04:07 +0100 Subject: [PATCH] Add GitHub Actions config, remove travis --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- 2 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..817c78e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: "Build and Tests" + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + main: + name: csaps-rs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + rustflags: "-A warnings" + + - name: Check format + run: cargo fmt --check + + - name: Check code + run: cargo clippy + + - name: Run tests + run: cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a1f21aa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: rust - -dist: bionic -addons: - apt: - packages: - - libssl-dev - -cache: cargo - -rust: - - stable - -before_script: | - if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then - cargo install cargo-tarpaulin - fi - -script: - - cargo clean - - cargo build - - cargo test - -after_success: | - if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID - fi