Test Manifest Builds #380
This file contains hidden or 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 Manifest Builds | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| FLOX_BRANCH: | |
| description: "branch of flox/flox" | |
| required: false | |
| default: "main" | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - "ubuntu-latest" | |
| - "macos-latest" | |
| env: | |
| FLOX_DISABLE_METRICS: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: "Install Nix" | |
| uses: "cachix/install-nix-action@v31" | |
| with: | |
| # `accept-flake-config` is required for substitution despite of also | |
| # setting `substituters` and `trusted-public-keys` here. | |
| extra_nix_config: | | |
| accept-flake-config = true | |
| experimental-features = nix-command flakes | |
| substituters = https://cache.flox.dev https://cache.nixos.org/ | |
| trusted-public-keys = flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
| # Test against the `main` branch of `flox/flox` so that we can exercise | |
| # new fixes, features, and catch regressions. | |
| - name: "Set FLOXBIN env var" | |
| run: echo "FLOXBIN=nix run github:flox/flox/${{ inputs.FLOX_BRANCH }} --" >> $GITHUB_ENV | |
| - name: "Show flox binary path" | |
| run: echo "Flox is at $FLOXBIN" | |
| - name: "Run flox version" | |
| run: $FLOXBIN --version | |
| - name: "Run make" | |
| run: make | |
| report-failure: | |
| name: "Report Failure" | |
| runs-on: "ubuntu-latest" | |
| timeout-minutes: 30 | |
| if: ${{ failure() && (github.base_ref == 'refs/heads/main' || github.ref == 'refs/heads/main') }} | |
| needs: | |
| - "test" | |
| steps: | |
| - name: "Slack Notification" | |
| uses: "rtCamp/action-slack-notify@v2" | |
| env: | |
| SLACK_TITLE: "Tests failed for manifest build examples" | |
| SLACK_FOOTER: "Thank you for caring" | |
| SLACK_WEBHOOK: "${{ secrets.MANAGED_SLACK_WEBHOOK }}" | |
| SLACK_USERNAME: "GitHub" | |
| SLACK_ICON_EMOJI: ":grimacing:" | |
| SLACK_COLOR: "#ff2800" # ferrari red -> https://encycolorpedia.com/ff2800 | |
| SLACK_LINK_NAMES: true | |