Merge pull request #311 from dmikusa/patch-1 #473
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: Tests | |
"on": | |
merge_group: | |
types: | |
- checks_requested | |
branches: | |
- main | |
pull_request: {} | |
push: | |
branches: | |
- main | |
jobs: | |
unit: | |
name: Unit Test | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
path: ${{ env.HOME }}/go/pkg/mod | |
restore-keys: ${{ runner.os }}-go- | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
- name: Install richgo | |
run: | | |
#!/usr/bin/env bash | |
set -euo pipefail | |
echo "Installing richgo ${RICHGO_VERSION}" | |
mkdir -p "${HOME}"/bin | |
echo "${HOME}/bin" >> "${GITHUB_PATH}" | |
curl \ | |
--location \ | |
--show-error \ | |
--silent \ | |
"https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ | |
| tar -C "${HOME}"/bin -xz richgo | |
env: | |
RICHGO_VERSION: 0.3.10 | |
- name: Run Tests | |
run: | | |
#!/usr/bin/env bash | |
set -euo pipefail | |
richgo test ./... | |
env: | |
RICHGO_FORCE_COLOR: "1" |