-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from metrumresearchgroup/gh-actions
ci: switch to GitHub Actions
- Loading branch information
Showing
208 changed files
with
188 additions
and
254 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'scratch/**' | ||
pull_request: | ||
|
||
# Note: this avoids golangci/golangci-lint-action to work around an | ||
# error triggered by us pinning to a golangci-lint version built with | ||
# an older Go. Revisit when moving from golangci-lint v1.47.2. | ||
# | ||
# https://github.com/golangci/golangci-lint-action/issues/442#issuecomment-1203786890 | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Install golangci-lint | ||
shell: bash | ||
run: | | ||
bin=$(mktemp -d) | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \ | ||
sh -s -- -b "$bin" v1.47.2 | ||
echo "$bin" >>$GITHUB_PATH | ||
- name: Run golangci-lint | ||
shell: bash | ||
run: | | ||
command -v golangci-lint | ||
golangci-lint run --out-format=github-actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'scratch/**' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ${{ matrix.config.os }} | ||
name: ${{ matrix.config.os }} (${{ matrix.config.go }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- os: ubuntu-20.04 | ||
go: 1.21.x | ||
- os: ubuntu-latest | ||
go: stable | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.config.go }} | ||
- name: Unit tests | ||
shell: bash | ||
run: go list ./... | grep -v integration | xargs go test | ||
- name: Build bbi | ||
shell: bash | ||
run: | | ||
version=$(git rev-parse 'HEAD^{tree}') | ||
bin=$(mktemp -d) | ||
go build -o "$bin/bbi" \ | ||
-ldflags "-X github.com/metrumresearchgroup/bbi/cmd.VERSION=$version" \ | ||
cmd/bbi/main.go | ||
echo "$bin" >>$GITHUB_PATH | ||
- name: Integration tests (postrun) | ||
shell: bash | ||
run: | | ||
bbi version | ||
go test ./integration/postrun | ||
release: | ||
if: github.ref_type == 'tag' | ||
name: Make release | ||
needs: check | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: '~> v2' | ||
args: release --clean | ||
workdir: cmd/bbi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/metrumresearchgroup/bbi | ||
|
||
go 1.15 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/clbanning/mxj v1.8.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory contains integration tests that rely on having NONMEM installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.