Run tests in CI

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2023-11-20 08:52:53 +02:00
parent f812f045c6
commit 4b7739d75d
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
2 changed files with 42 additions and 5 deletions

View File

@ -11,23 +11,27 @@ on:
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
go-version: 1.20.x
cache-dependency-path: |
**/go.sum
**/go.mod
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist -f release/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

33
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,33 @@
# Copyright 2023 The Flux Authors.
# SPDX-License-Identifier: Apache-2.0
name: test
on:
workflow_dispatch:
push:
branches:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
cache-dependency-path: |
**/go.sum
**/go.mod
-
name: Test
run: |
make tidy
make test