Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ybirader committed Sep 24, 2023
1 parent a600225 commit 2370020
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 2 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
go:
- '1.21'
include:
- go: '1.21'
GO_SEMVER: '~1.21.0'

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build pzip
working-directory: ./cmd/pzip
env:
CGO_ENABLED: 0
run: |
go build -v
- name: Build punzip
working-directory: ./cmd/punzip
env:
CGO_ENABLED: 0
run: |
go build -v
- name: Run tests
run: |
go test -v -race ./...
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: check
env:
TAG: ${{ steps.vars.outputs.version_tag }}
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ builds:
binary: pzip
goos:
- linux
- windows
- darwin
- freebsd
goarch:
Expand All @@ -27,7 +26,6 @@ builds:
binary: punzip
goos:
- linux
- windows
- darwin
- freebsd
goarch:
Expand Down

0 comments on commit 2370020

Please sign in to comment.