Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Aug 18, 2024
1 parent e1dcf58 commit f551bff
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request: {}
name: Continuous Integration

pull_request:
types:
- opened
- reopened

jobs:
test:
name: Test
name: Tests
strategy:
matrix:
go-version: [ 1.23 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: stable

- name: Install Ubuntu dependencies
run: sudo apt install libpam0g-dev

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache
uses: actions/cache@v4
Expand All @@ -45,4 +50,4 @@ jobs:
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls "-coverprofile=profile.cov" "-service=github" "-parallel" "-flagname=go-${{ matrix.go-version }}-${{ matrix.os }}"
goveralls "-coverprofile=profile.cov" "-service=github" "-parallel" "-flagname=go-${{ matrix.os }}"
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Release"

on:
release:
types: [ published ]

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Ubuntu dependencies
run: sudo apt install libpam0g-dev

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: |
mkdir -p var
go test -v -race ./...
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f551bff

Please sign in to comment.