CI - Nix #717
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: CI - Nix | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/workflows/ci-nix.yml' | |
- '**.nix' | |
- 'flake.*' | |
- 'Gemfile*' | |
pull_request: | |
paths: | |
- '.github/workflows/ci-nix.yml' | |
- '**.nix' | |
- 'flake.*' | |
- 'Gemfile*' | |
schedule: | |
# Every 10:42 JST | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '42 1 * * *' | |
workflow_dispatch: | |
jobs: | |
tasks: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-24.04 | |
- macos-14 | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- run: nix flake check | |
- run: nix develop --command echo 'This step should be done before any other "nix develop" steps because of measuring Nix build time' | |
- run: nix run .#ruby -- -rprime -e 'p Prime.first 5; p ULID.generate' | |
- run: nix develop --command bundle install | |
- name: Log current versions | |
run: nix develop --command bundle exec rake deps | |
- name: Test with external dependencies | |
run: nix develop --command bundle exec rake check_non_ruby | |
- name: Test with Ruby | |
run: nix develop --command bundle exec rake |