From 5c5f1337b7a924518d6c3691f274ab7b94305ac7 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 | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- 2 files changed, 34 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..7f65cc0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +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 + +# - 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