Skip to content

Commit

Permalink
add: GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinB committed Aug 27, 2024
1 parent b5824c9 commit 8402d03
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
release:
types: [created]

permissions:
contents: write
packages: write

jobs:
release-linux-amd64:
name: release linux/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: wangyoucao577/go-release-action@6ac7dba1f9e61850053324549cb6bc88e4b473d2 #release/rel-v1.51
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: linux
goarch: amd64
goversion: 1.23.0
compress_assets: OFF
md5sum: FALSE
sha256sum: TRUE
asset_name: 'cdx-linux-amd64'
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Build
run: go build -v ./...

- name: Test
run: go test -race -v ./...

- name: Goroutine leak detector
run: go test -c -o tests && for test in $(go test -list . | grep -E "^(Test|Example)"); do ./tests -test.run "^$test\$" &>/dev/null && echo -e "$test passed\n" || echo -e "$test failed\n"; done

0 comments on commit 8402d03

Please sign in to comment.