fix: use string literals for require and load #925
Workflow file for this run
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: | |
push: | |
# Run periodically, to build with latest -unstable releases. Caching makes | |
# this a cheap operation when nothing changed, so no need for further logic. | |
schedule: | |
# 13 is a random non-0 minute to be nice to GitHub because most jobs | |
# probably run on the hour | |
- cron: '13 */6 * * *' | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
config: | |
- os: ubuntu-latest | |
channel: nixpkgs-unstable | |
- os: ubuntu-latest | |
channel: nixos-23.05 | |
- os: macos-latest | |
channel: nixpkgs-unstable | |
- os: macos-latest | |
channel: nixpkgs-23.05-darwin | |
runs-on: ${{ matrix.config.os }} | |
concurrency: | |
# Different runs of the same job are very likely candidates for (partial) | |
# caching, which is defeated in parallel runs. Be nice to GitHub. | |
group: ${{ matrix.config.os }}-${{ matrix.config.channel }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:${{ matrix.config.channel }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: cl-nix-lite | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Update flake locks to use this cl-nix-lite | |
run: | | |
for example in examples/flakes/* ; do | |
( cd "$example" && nix flake lock --override-input cl-nix-lite ../../.. ) | |
done | |
# Only bother actually building derivations that are not yet in the | |
# store. This prevents nix-build from downloading all built binaries from | |
# the store only to discard them immediately afterwards. | |
- name: All examples | |
# Inspired by | |
# https://github.com/divnix/std-action/blob/5ead0a37047d44137f950247ee4d3e26fda291d7/run/build-uncached-extractor.sed | |
# Works on both BSD (Darwin) and GNU sed. Prints every store path | |
# following “.. will be built:”. | |
run: | | |
set -euo pipefail | |
cd examples && \ | |
nix-build --no-out-link --dry-run 2>&1 | \ | |
tee nix-build.out | \ | |
sed -ne '/will be built:$/ { | |
# label | |
:b | |
# next line | |
n | |
# If the line is indented, it’s a store path | |
/^ /{ | |
# Print it | |
p | |
# goto label b | |
bb | |
} | |
}' | \ | |
xargs -r nix-build --keep-going --no-out-link | |
- name: nix-build error output | |
if: failure() | |
run: "cat examples/nix-build.out" |