From 1ac25d1792088934977291cbc426ab149d40fb60 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Sun, 3 Sep 2023 18:13:41 +0200 Subject: [PATCH] chore: add workflows --- .forgejo/workflows/go.yaml | 25 +++++++++++++++++++++++++ .forgejo/workflows/nix.yaml | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .forgejo/workflows/go.yaml create mode 100644 .forgejo/workflows/nix.yaml diff --git a/.forgejo/workflows/go.yaml b/.forgejo/workflows/go.yaml new file mode 100644 index 0000000..93979bb --- /dev/null +++ b/.forgejo/workflows/go.yaml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/.forgejo/workflows/nix.yaml b/.forgejo/workflows/nix.yaml new file mode 100644 index 0000000..412b60e --- /dev/null +++ b/.forgejo/workflows/nix.yaml @@ -0,0 +1,18 @@ +name: "Nix" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v22 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - run: nix build + - run: nix flake check