mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-07-01 03:05:41 +02:00
Merge pull request #367 from commercialhaskell/b/cache-warmup
CI cache warmup
This commit is contained in:
commit
08d08c472f
22
.github/actions/stack-test/action.yml
vendored
Normal file
22
.github/actions/stack-test/action.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: stack test
|
||||||
|
description: Build and test with stack
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- uses: haskell/ghcup-setup@v1
|
||||||
|
id: ghcup
|
||||||
|
with:
|
||||||
|
stack-hook: true
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ steps.ghcup.outputs.basedir }}
|
||||||
|
~/.stack
|
||||||
|
key: stack-${{ runner.os }}-${{ hashFiles('stack.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
stack-${{ runner.os }}-
|
||||||
|
${{ runner.os }}-
|
||||||
|
- run: ghcup install stack
|
||||||
|
shell: bash
|
||||||
|
- run: stack test
|
||||||
|
shell: bash
|
||||||
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
name: check and push
|
# CI that runs on pull requests and pushes to master.
|
||||||
|
name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -12,46 +13,17 @@ jobs:
|
|||||||
name: stack test
|
name: stack test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: haskell/ghcup-setup@v1
|
- uses: ./.github/actions/stack-test
|
||||||
id: ghcup
|
|
||||||
with:
|
|
||||||
stack-hook: true
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ steps.ghcup.outputs.basedir }}
|
|
||||||
~/.stack
|
|
||||||
key: stack-${{ runner.os }}-${{ hashFiles('stack.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
stack-${{ runner.os }}-
|
|
||||||
${{ runner.os }}-
|
|
||||||
- run: ghcup install stack
|
|
||||||
- run: stack test
|
|
||||||
|
|
||||||
flake-no-push:
|
flake-check:
|
||||||
name: flake check (no push)
|
|
||||||
if: github.event_name != 'push'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: cachix/install-nix-action@v31
|
|
||||||
- uses: cachix/cachix-action@v15
|
|
||||||
with:
|
|
||||||
name: stackage-infrastructure
|
|
||||||
- run: nix build
|
|
||||||
- run: nix flake check
|
|
||||||
|
|
||||||
flake-push:
|
|
||||||
name: flake check and push
|
name: flake check and push
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31
|
- uses: cachix/install-nix-action@v31
|
||||||
- uses: cachix/cachix-action@v15
|
- uses: DeterminateSystems/magic-nix-cache-action@v13
|
||||||
with:
|
- uses: cachix/cachix-action@v17
|
||||||
name: stackage-infrastructure
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
- run: nix build
|
- run: nix build
|
||||||
- run: nix flake check
|
- run: nix flake check
|
||||||
|
|||||||
13
.github/workflows/cache-warmup.yaml
vendored
Normal file
13
.github/workflows/cache-warmup.yaml
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name: biweekly cache warmup
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Every Monday and Thursday at 11:23 UTC
|
||||||
|
- cron: '23 11 * * mon,thu'
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
stack-test:
|
||||||
|
name: stack test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: ./.github/actions/stack-test
|
||||||
Loading…
Reference in New Issue
Block a user