2023-07-19 01:53:49 +00:00
|
|
|
name: "Test"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
workflow_call:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-cache:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-09-10 04:24:06 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-07-19 01:53:49 +00:00
|
|
|
|
2023-07-19 02:51:10 +00:00
|
|
|
- uses: pnpm/action-setup@v2
|
2023-10-24 03:41:22 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2023-07-19 02:51:10 +00:00
|
|
|
with:
|
|
|
|
cache: pnpm
|
|
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: pnpm install && pnpm build
|
|
|
|
|
2023-07-19 01:53:49 +00:00
|
|
|
- name: Install Nix
|
2023-10-09 23:19:24 +00:00
|
|
|
uses: DeterminateSystems/nix-installer-action@v5
|
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:51:10 +00:00
|
|
|
- name: Build Nix Package
|
2023-07-21 03:38:26 +00:00
|
|
|
run: nix build --impure --show-trace -L .#test
|