diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 78e0fc7..32f51b4 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -17,6 +17,10 @@ jobs: matrix: os: [ubuntu-latest] ghc-version: [ghc_8_10_7, ghc_9_0_2, ghc_9_2_7, ghc_9_4_5] + enable-bzlmod: [false] + include: + - ghc-version: ghc_9_4_5 + enable-bzlmod: true runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -48,10 +52,16 @@ jobs: build --keep_backend_build_event_connections_alive=false build --repository_cache=~/repo-cache/ EOF + + if [[ ${{ matrix.enable-bzlmod }} ]] + echo "common --config=bzlmod" >>.bazelrc.local + fi + ln -s ../.bazelrc.local example/.bazelrc.local ln -s ../../.bazelrc.local tests/alternative-deps/.bazelrc.local - name: Build & test run: nix-shell --pure --run 'bazel test --config=${{ matrix.ghc-version }} --test_output=all //...' + if: ${{ !matrix.enable-bzlmod }} - name: Test the example run: | cd example @@ -113,5 +123,7 @@ jobs: nix-shell --pure --run 'bazel run //:gazelle --config=${{ matrix.ghc-version }}' nix-shell --pure --run 'bazel run //:gazelle-update-repos --config=${{ matrix.ghc-version }}' nix-shell --pure --run 'bazel test //... --config=${{ matrix.ghc-version }}' + if: ${{ !matrix.enable-bzlmod }} - name: Test for buildifier suggestions run: nix-shell --pure --run 'bazel run //:buildifier-diff' + if: ${{ !matrix.enable-bzlmod }}