From abd6fc29f744b68faf9b8718ab6ff07fdf5fc3ce Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 20 Mar 2021 16:21:49 +0900 Subject: [PATCH] Migrate CI to GitHub Actions --- .github/workflows/build-and-test.yaml | 36 +++++++++++++++++++++++++++ .github/workflows/lint.yaml | 23 +++++++++++++++++ .github/workflows/security.yaml | 17 +++++++++++++ .travis.yml | 10 -------- 4 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-and-test.yaml create mode 100644 .github/workflows/lint.yaml create mode 100644 .github/workflows/security.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml new file mode 100644 index 0000000..06ff252 --- /dev/null +++ b/.github/workflows/build-and-test.yaml @@ -0,0 +1,36 @@ +name: Build and test + +on: + push: + branches: + - master + pull_request: + +jobs: + build_and_test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + rust: [nightly, beta, stable] + steps: + - uses: actions/checkout@v2 + + - name: Install latest ${{ matrix.rust }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --benches --bins --examples --tests --all-features + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..b6017f1 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,23 @@ +name: Lint + +on: + push: + branches: + - master + pull_request: + +jobs: + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features -- -W clippy::all diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml new file mode 100644 index 0000000..c4f7947 --- /dev/null +++ b/.github/workflows/security.yaml @@ -0,0 +1,17 @@ +name: Security audit + +on: + push: + branches: + - master + pull_request: + +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0476df5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: rust - -rust: - - stable - - beta - - nightly - -matrix: - allow_failures: - - rust: nightly