update changelog #560
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
| # Copyright 2024-2025 Sam Windell | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| name: Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - build-revamp | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| env: | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN_DEVELOPMENT }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Specify a relative path for reproducible builds (no absolute paths in binaries). | |
| ZIG_GLOBAL_CACHE_DIR: .zig-cache-global | |
| jobs: | |
| mac: | |
| runs-on: macos-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| - uses: DeterminateSystems/flakehub-cache-action@main | |
| - uses: nicknovitski/[email protected] | |
| - run: zig build script:ci | |
| - name: Upload logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-macos | |
| if-no-files-found: ignore | |
| path: ~/Library/Logs/Floe/* | |
| - if: '!cancelled()' | |
| name: Upload test results | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| flags: macos | |
| directory: .zig-cache | |
| linux: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| - uses: DeterminateSystems/flakehub-cache-action@main | |
| - uses: nicknovitski/[email protected] | |
| - run: zig build script:ci | |
| - if: '!cancelled()' | |
| name: Upload coverage reports | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: .floe-cache/coverage-out/tests | |
| verbose: true | |
| fail_ci_if_error: true | |
| report_type: coverage | |
| # "Codecov automatically scans for files matching the *junit.xml pattern". We are expecting files | |
| # like these in the floe-cache directory. | |
| - if: '!cancelled()' | |
| name: Upload test results | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: .zig-cache | |
| verbose: true | |
| flags: linux | |
| report_type: test_results | |
| - name: Upload logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-linux | |
| if-no-files-found: ignore | |
| path: ~/.local/state/Floe/Logs/* | |
| windows: | |
| runs-on: windows-latest | |
| if: '!cancelled()' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.14.0 | |
| - name: Install sentry-cli | |
| run: | | |
| choco install sentry-cli -y --no-progress | |
| sentry-cli --version | |
| - run: zig build script:ci | |
| - if: '!cancelled()' | |
| name: Upload test results | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: .zig-cache | |
| verbose: true | |
| flags: windows | |
| report_type: test_results | |
| - name: Upload logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs-windows | |
| if-no-files-found: ignore | |
| path: ~/AppData/Local/Floe/Logs/* | |
| notify: | |
| # We run this for main/develop, and also for PRs that are not from forks; in other words, PRs originating from Floe devs. | |
| if: ${{ ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && !cancelled() }} | |
| runs-on: ubuntu-latest | |
| needs: [linux, windows, mac] | |
| steps: | |
| - run: | | |
| report="Floe CI" | |
| report_job() { | |
| job=$1 | |
| result=$2 | |
| if [ "$result" == "success" ]; then | |
| report="$report | $job: ✅" | |
| else | |
| report="$report | $job: ❌" | |
| fi | |
| } | |
| report_job "Windows" ${{ needs.windows.result }} | |
| report_job "Mac" ${{ needs.mac.result }} | |
| report_job "Linux" ${{ needs.linux.result }} | |
| curl -d "$report" "ntfy.sh/${{ secrets.NTFY_CI_URL }}" |