Support for GH_HOST env variable #316
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Build | |
run: go build -v ./... | |
- name: Checkout dummy repo | |
uses: actions/checkout@v4 | |
with: | |
repository: seachicken/can | |
path: ci-test | |
fetch-depth: 0 | |
- name: Test | |
working-directory: ./ci-test | |
run: | | |
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match 'main$') | |
do | |
git branch --track "${branch##*/}" "$branch" | |
done | |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
go test $(go list ../... | grep -v /conn) -v -race -coverprofile=coverage.out -covermode=atomic | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: ./ci-test/ | |
token: ${{ secrets.CODECOV_TOKEN }} |