| 1 | on: |
| 2 | push: |
| 3 | branches: [main, staging, trying] |
| 4 | pull_request: |
| 5 | branches: [main] |
| 6 | |
| 7 | name: Continuous integration |
| 8 | |
| 9 | jobs: |
| 10 | test : |
| 11 | name: test |
| 12 | runs-on: ubuntu-latest |
| 13 | |
| 14 | strategy: |
| 15 | matrix: |
| 16 | target: |
| 17 | - x86_64-unknown-linux-gnu |
| 18 | - i686-unknown-linux-musl |
| 19 | |
| 20 | steps: |
| 21 | - uses: actions/checkout@v2 |
| 22 | - uses: actions-rs/toolchain@v1 |
| 23 | with: |
| 24 | profile: minimal |
| 25 | toolchain: stable |
| 26 | target: ${{ matrix.target }} |
| 27 | override: true |
| 28 | |
| 29 | - uses: actions-rs/cargo@v1 |
| 30 | with: |
| 31 | command: test |
| 32 | args: --target ${{ matrix.target }} |
| 33 | |
| 34 | ci-success: |
| 35 | name: ci |
| 36 | if: github.event_name == 'push' && success() |
| 37 | needs: |
| 38 | - test |
| 39 | runs-on: ubuntu-latest |
| 40 | steps: |
| 41 | - name: Mark the job as a success |
| 42 | run: exit 0 |