Prechádzať zdrojové kódy

CI: Replace Travis with GitHub Actions

Looks like Travis now requires setting up a plan with a credit card,
even for the free tier, and I have no intention to do so at the moment.
Let's move to GitHub Actions instead.

Note: We lose tests on macOS runners.
Quentin Monnet 2 rokov pred
rodič
commit
000928e53b
2 zmenil súbory, kde vykonal 43 pridanie a 11 odobranie
  1. 43 0
      .github/workflows/test.yaml
  2. 0 11
      .travis.yml

+ 43 - 0
.github/workflows/test.yaml

@@ -0,0 +1,43 @@
+name: CI
+
+on:
+  pull_request: {}
+  push:
+    branches:
+      - master
+
+jobs:
+  build_and_test:
+    name: Build and test package
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        include:
+          - toolchain: stable
+          - toolchain: beta
+          - toolchain: nightly
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Install toolchain (${{ matrix.toolchain }})
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: ${{ matrix.toolchain }}
+          override: true
+          components: clippy
+
+      - name: Build with ${{ matrix.toolchain }}
+        uses: actions-rs/cargo@v1
+        with:
+          command: build
+          args: --release --all-features
+      - name: Test with ${{ matrix.toolchain }}
+        uses: actions-rs/cargo@v1
+        with:
+          command: test
+      - name: Lint with ${{ matrix.toolchain }}
+        uses: actions-rs/cargo@v1
+        with:
+          command: clippy

+ 0 - 11
.travis.yml

@@ -1,11 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-os:
-  - linux
-  - osx
-matrix:
-  allow_failures:
-    - rust: nightly