hishtory/.github/workflows/go-test.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

name: Tests
2022-04-09 20:56:25 +02:00
on:
workflow_dispatch:
2022-09-17 20:54:26 +02:00
pull_request:
schedule:
- cron: '0 0 * * *'
2022-04-09 20:56:25 +02:00
push:
2022-04-09 20:58:49 +02:00
branches: [ master ]
2022-04-09 20:56:25 +02:00
jobs:
test:
2022-04-17 19:50:37 +02:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
2022-04-09 20:56:25 +02:00
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
2022-04-09 20:56:25 +02:00
with:
go-version: 1.18
# - uses: mxschmitt/action-tmate@v3
- name: Go test
2022-04-17 20:56:00 +02:00
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
run: |
sudo apt-get update || true
2022-10-20 02:58:32 +02:00
sudo apt-get install -y zsh fish || true
brew install fish tmux bash || true
export TZ='America/Los_Angeles' # Force the time zone so that test output is consistent
2022-11-05 07:15:28 +01:00
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actions gives that diretory 0777 which makes zsh refuse to start
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
sudo scutil --set HostName ghaction-runner-hostname || true
make test