Skip to content

github: consolidate codeowners file into sub-dir file. #792

github: consolidate codeowners file into sub-dir file.

github: consolidate codeowners file into sub-dir file. #792

Workflow file for this run

name: Go Tests
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Go
uses: hashicorp/setup-golang@36878950ae8f21c1bc25accaf67a4df88c29b01d # v3.0.0
# install deps using go install
- name: Install test dependencies
run: |
go install gotest.tools/gotestsum@latest
make test-certs
# install nomad
- name: Install Nomad
run : |
sudo apt -y install wget gpg coreutils
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt -y install nomad
# Run tests with nice formatting. Save the original log in /tmp/gotest.log
- name: Run tests
run: |
gotestsum -f testname --jsonfile /tmp/test-output.log -- ./...
# Upload the original go test log as an artifact for later review.
- name: Upload test log
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-log
path: /tmp/test-output.log
if-no-files-found: error