2023-07-19 01:53:49 +00:00
|
|
|
name: "Test"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
pull_request:
|
|
|
|
workflow_call:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-cache:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install Nix
|
|
|
|
uses: cachix/install-nix-action@v22
|
|
|
|
|
2023-07-19 02:37:21 +00:00
|
|
|
- name: Setup nixpkgs
|
|
|
|
run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable && nix-channel --update
|
|
|
|
|
2023-07-19 01:53:49 +00:00
|
|
|
- name: Setup Attic Cache
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
|
|
|
cache: ${{ secrets.ATTIC_CACHE }}
|
|
|
|
token: ${{ secrets.ATTIC_TOKEN }}
|
|
|
|
|
2023-07-19 02:37:21 +00:00
|
|
|
- name: Build
|
|
|
|
run: nix-build test.nix
|