From 7052d78225cbcd767f398b72e6327d2926e3b829 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 24 May 2024 11:22:15 +0200 Subject: [PATCH] Add CI checks --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7feb300 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Test examples + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '0 0 * * *' + + workflow_dispatch: + +jobs: + + test_externally: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + bazel: [7.x, last_green] + os: [ubuntu-latest, macos-13, macos-latest] + env: + BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - name: Test examples + env: + USE_BAZEL_VERSION: ${{ matrix.bazel }} + working-directory: ./examples + run: bazelisk test //... + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: testlogs-${{ matrix.bazel}}-${{ matrix.os }} + # https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236 + path: | + ${{ github.workspace }}/examples/bazel-testlogs*/**/test.log