From e758f7dc2aaaa6456ea8ce3586214df854812f08 Mon Sep 17 00:00:00 2001 From: Daniel Abramov Date: Wed, 12 Apr 2023 12:58:52 +0200 Subject: [PATCH] Exchange Travis CI for GitHub Actions --- .github/workflows/ci.yml | 70 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 14 -------- 2 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9bfad30 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,70 @@ +name: CI + +on: [push, pull_request] + +jobs: + fmt: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - run: cargo fmt --all --check + + test: + name: Test + runs-on: ubuntu-latest + + strategy: + matrix: + rust: + - stable + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + + - name: Install dependencies + run: sudo apt-get install libssl-dev + + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + + - name: Check + run: cargo hack check --feature-powerset --all-targets + + - name: Test + run: cargo test --release + + autobahn: + name: Autobahn tests + runs-on: ubuntu-latest + + strategy: + matrix: + rust: + - stable + - beta + - nightly + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + + - name: Running Autobahn TestSuite for client + run: ./scripts/autobahn-client.sh + + - name: Running Autobahn TestSuite for server + run: ./scripts/autobahn-server.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 32457c3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: rust -rust: - - stable - -services: - - docker - -before_script: - - export PATH="$PATH:$HOME/.cargo/bin" - -script: - - cargo test --release - - echo "Running Autobahn TestSuite for client" && ./scripts/autobahn-client.sh - - echo "Running Autobahn TestSuite for server" && ./scripts/autobahn-server.sh