-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: refactor out common build steps in CI pipelines
- Loading branch information
1 parent
f92f275
commit 6728cbc
Showing
2 changed files
with
31 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Common Setup" | ||
description: "Sets up Nix and the development environment" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: Setup Magic Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
- name: Use nix-develop shell | ||
uses: nicknovitski/[email protected] | ||
with: | ||
arguments: ./nix --impure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
name: "premerge" | ||
on: [push] | ||
|
||
setup_steps: &setup_steps | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: Setup Magic Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
- name: Use nix-develop shell | ||
uses: nicknovitski/[email protected] | ||
with: | ||
arguments: ./nix --impure | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Magic Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Use nix-develop shell | ||
uses: nicknovitski/[email protected] | ||
with: | ||
arguments: ./nix --impure | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
@@ -41,19 +42,8 @@ jobs: | |
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Magic Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Use nix-develop shell | ||
uses: nicknovitski/[email protected] | ||
with: | ||
arguments: ./nix --impure | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|