Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ max-threads = 1
failure-output = "immediate-final"
# Do not cancel the test run on the first failure.
fail-fast = false
# The Garnix CI builders run in some weird virtual filesystem that messes with
# `notify`. Even with sleeps before writing and poll-based notifications,
# sometimes `notify` misses events (this is rare, maybe 1 in 50 test runs).
# Retry tests if they fail in CI to mitigate this.
# CI builders are generally unreliable. Even with sleeps before writing and
# poll-based notifications, sometimes `notify` misses events (this is rare,
# maybe 1 in 50 test runs). Retry tests if they fail in CI to mitigate this.
#
# See also the `$TIMEOUT_MULT` environment variable.
retries = 1
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: CI

on:
push:
branches:
- main
pull_request:
Comment thread
9999years marked this conversation as resolved.
branches:
- main
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: nix flake check (${{ matrix.platform.runner }})
runs-on: ${{ matrix.platform.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
- runner: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a caching step after this one be beneficial?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we don't have a public/OSS Nix cache yet.

See: https://linear.app/mercury/issue/OSPO-23/oss-nix-cache

with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
accept-flake-config = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accept-flake-config = true

Isn't that setting a no-op since the nixConfig was removed from flake.nix?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but hopefully we'll have more config (for a new cache) in the future.


- name: nix flake check
run: nix flake check --print-build-logs
6 changes: 0 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
};
};

nixConfig = {
extra-substituters = ["https://cache.garnix.io"];
extra-trusted-substituters = ["https://cache.garnix.io"];
extra-trusted-public-keys = ["cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="];
};

outputs = inputs @ {
self,
nixpkgs,
Expand Down
10 changes: 0 additions & 10 deletions garnix.yaml

This file was deleted.