Skip to content

Commit

Permalink
Run tests in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Nov 20, 2023
1 parent f812f04 commit 4b7739d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4b7739d

Please sign in to comment.