Skip to content

Commit

Permalink
chore: add ci workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Penner <[email protected]>
  • Loading branch information
matthewpi committed May 19, 2024
1 parent e06033e commit ce67e31
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
name: Test
permissions:
contents: read
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
go: ["1.21.10", "1.22.3"]

steps:
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ matrix.go }}

- name: Code checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: go mod download
env:
CGO_ENABLED: 0
run: |
go mod download
- name: go test
env:
CGO_ENABLED: 0
run: |
go test ./...
- name: go test -race
env:
CGO_ENABLED: 1
run: |
go test -race ./...
28 changes: 28 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: nix

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
flake-check:
name: flake check
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Code checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@8cdf194da984e4f12b2f8c36d1fa107c1dd67f5c # v11

- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e # v6

- name: nix flake check
run: nix flake check --all-systems

0 comments on commit ce67e31

Please sign in to comment.