Migrate from Flakes to Devenv #331
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: Devenv | |
on: | |
push: | |
branches: | |
- trunk | |
pull_request: | |
branches: | |
- "trunk" | |
paths: | |
- .github/workflows/devenv.yaml | |
- devenv.nix | |
- devenv.nix | |
- devenv.lock | |
- devenv/** | |
permissions: | |
contents: write | |
packages: write | |
pull-requests: write | |
statuses: read | |
env: | |
NIXPKGS_ALLOW_UNFREE: 1 | |
PROJECT: ${{ github.repository }} | |
BRANCH_NAME_CURRENT: ${{ github.head_ref || github.ref_name }} | |
BRANCH_NAME_DEFAULT: ${{ github.event.repository.default_branch }} | |
REGISTRY_AUTH_FILE: ./auth.json | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
################################################## | |
# Test | |
################################################## | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
continue-on-error: false | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
steps: | |
- id: checkout_repository | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
submodules: recursive | |
- id: install_nix | |
name: "Install Nix ❄️" | |
uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- id: cachix | |
name: "Enable Cachix ❄️" | |
uses: cachix/cachix-action@v14 | |
with: | |
name: ${{ secrets.CACHIX_CACHE_NAME }} | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
useDaemon: true | |
skipPush: false | |
- id: install_devenv | |
name: Install devenv | |
run: | | |
nix profile install tarball+https://install.devenv.sh/latest | |
- id: devenv_test | |
name: Devenv Tests | |
run: | | |
devenv test |