chore(deps): update io_tweag_gazelle_haskell_modules digest to 9182365 #766
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
name: "Test" | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test-package: | |
name: Build & Run (package) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=./nix/nixpkgs.nix | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: cbley | |
extraPullNames: pre-commit-hooks | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
# Only needed for private caches | |
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix flake check | |
- name: Set author identity and password | |
run: |- | |
git config user.email '${{ github.actor }}@users.noreply.github.com' | |
git config user.name '${{ github.actor }}' | |
git config user.password '${{ secrets.PR_TOKEN }}' | |
- name: Update bazel-central-registry flake input | |
if: github.event.pull_request.user.login == 'renovate[bot]' && github.repository == 'avdv/replay' | |
run: |- | |
git switch -c pr-branch ${{ github.event.pull_request.head.sha }} | |
nix flake lock --update-input bazel-central-registry --commit-lock-file | |
- name: Update replay.deps hash | |
id: hash-update | |
if: github.event_name == 'pull_request' && github.repository == 'avdv/replay' | |
run: |- | |
nix develop --command .github/update-hash replay.deps | |
echo exit=$( git diff --quiet flake.nix ; echo $? ) >> "$GITHUB_OUTPUT" | |
- name: Push changes to PR | |
if: steps.hash-update.outputs.exit != '0' | |
run: |- | |
git commit -m 'Update replay.deps hash' flake.nix | |
git push origin HEAD:${{ github.head_ref }} | |
exit 1 | |
- run: nix build --print-build-logs | |
- run: nix run . -- --help | |
test-shell: | |
name: Build & Run (shell) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=./nix/nixpkgs.nix | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: cbley | |
extraPullNames: pre-commit-hooks | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
# Only needed for private caches | |
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Set up BuildBuddy | |
env: | |
BUILDBUDDY_API_KEY: '${{ secrets.BUILDBUDDY_API_KEY }}' | |
run: | | |
if [ -z "$BUILDBUDDY_API_KEY" ]; then | |
cache_setting='build --noremote_upload_local_results' | |
else | |
cache_setting="build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" | |
fi | |
cat > .bazelrc.local <<EOF | |
startup --max_idle_secs=5 | |
common --config=ci | |
$cache_setting | |
EOF | |
cat > ~/.netrc <<EOF | |
machine api.github.com | |
password ${{ secrets.GITHUB_TOKEN }} | |
EOF | |
- run: nix develop --command bazel build ... | |
- run: nix develop --command bazel run -- //:replay --help | |