-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- id: bazel_6 | ||
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT | ||
- id: bazel_5 | ||
run: echo "bazelversion=5.3.2" >> $GITHUB_OUTPUT | ||
# - id: bazel_5 | ||
# run: echo "bazelversion=5.3.2" >> $GITHUB_OUTPUT | ||
outputs: | ||
# Will look like ["<version from .bazelversion>", "5.3.2"] | ||
bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }} | ||
|
@@ -60,12 +60,12 @@ jobs: | |
bazelversion: ${{ fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions) }} | ||
folder: | ||
- . | ||
- e2e/custom_registry | ||
- e2e/wasm | ||
- e2e/smoke | ||
- e2e/crane_as_registry | ||
# - e2e/custom_registry | ||
# - e2e/wasm | ||
# - e2e/smoke | ||
# - e2e/crane_as_registry | ||
|
||
bzlmodEnabled: [true, false] | ||
bzlmodEnabled: [false] # [true, false] | ||
exclude: | ||
# Don't test bzlmod with Bazel 5 (not supported) | ||
- bazelversion: 5.3.2 | ||
|
@@ -80,17 +80,17 @@ jobs: | |
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
- name: Mount bazel caches | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/bazel | ||
~/.cache/bazel-repo | ||
key: bazel-cache-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }} | ||
restore-keys: | | ||
bazel-cache-${{ matrix.os }}-${{ matrix.folder }} | ||
bazel-cache-${{ matrix.os }} | ||
bazel-cache- | ||
# - name: Mount bazel caches | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: | | ||
# ~/.cache/bazel | ||
# ~/.cache/bazel-repo | ||
# key: bazel-cache-${{ matrix.os }}-${{ matrix.folder }}-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }} | ||
# restore-keys: | | ||
# bazel-cache-${{ matrix.os }}-${{ matrix.folder }} | ||
# bazel-cache-${{ matrix.os }} | ||
# bazel-cache- | ||
|
||
- name: Set bzlmod flag | ||
# Store the --enable_bzlmod flag that we add to the test command below | ||
|
@@ -103,36 +103,50 @@ jobs: | |
working-directory: ${{ matrix.folder }} | ||
run: echo "${{ matrix.bazelversion }}" > .bazelversion | ||
|
||
- name: Configure TestContainers cloud | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
uses: atomicjar/testcontainers-cloud-setup-action@main | ||
with: | ||
wait: true | ||
token: ${{ secrets.TC_CLOUD_TOKEN }} | ||
|
||
- name: Setup Remote Docker | ||
run: echo "DOCKER_HOST=$(cat ~/.testcontainers.properties | grep 'docker.host' | cut -d '=' -f2 | xargs)" >> $GITHUB_ENV | ||
|
||
- name: Setup upterm session | ||
uses: lhotari/action-upterm@v1 | ||
|
||
- name: bazel test //... | ||
working-directory: ${{ matrix.folder }} | ||
if: ${{ false }} | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc --bazelrc=.bazelrc test ${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} //... | ||
test-auth: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup bats | ||
uses: mig4/setup-bats@v1 | ||
with: | ||
bats-version: "1.8.2" | ||
# test-auth: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup bats | ||
# uses: mig4/setup-bats@v1 | ||
# with: | ||
# bats-version: "1.8.2" | ||
|
||
- name: Setup bats helpers | ||
uses: brokenpip3/[email protected] | ||
with: | ||
support-path: /usr/lib/bats/bats-support | ||
support-version: "0.3.0" | ||
assert-path: /usr/lib/bats/bats-assert | ||
assert-version: "2.1.0" | ||
|
||
- name: bats -r . | ||
working-directory: e2e/auth | ||
run: | | ||
for i in {1..5}; do bats -r . && break || sleep 5; done | ||
- name: bats -r . --enable_bzlmod | ||
working-directory: e2e/auth | ||
run: | | ||
echo "build --enable_bzlmod" >> .bazelrc.user | ||
for i in {1..5}; do bats -r . && break || sleep 5; done | ||
# - name: Setup bats helpers | ||
# uses: brokenpip3/[email protected] | ||
# with: | ||
# support-path: /usr/lib/bats/bats-support | ||
# support-version: "0.3.0" | ||
# assert-path: /usr/lib/bats/bats-assert | ||
# assert-version: "2.1.0" | ||
|
||
# - name: bats -r . | ||
# working-directory: e2e/auth | ||
# run: | | ||
# for i in {1..5}; do bats -r . && break || sleep 5; done | ||
|
||
# - name: bats -r . --enable_bzlmod | ||
# working-directory: e2e/auth | ||
# run: | | ||
# echo "build --enable_bzlmod" >> .bazelrc.user | ||
# for i in {1..5}; do bats -r . && break || sleep 5; done |