2022-01-17 14:01:58 +01:00
|
|
|
name: Test Code Darwin
|
2022-10-02 21:17:16 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2022-06-24 14:50:14 +02:00
|
|
|
|
2023-04-13 17:00:01 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-01-17 14:01:58 +01:00
|
|
|
jobs:
|
|
|
|
test:
|
2023-10-12 15:42:36 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-10-16 11:19:39 +02:00
|
|
|
store: ['jsonfile', 'sqlite']
|
2022-01-17 14:01:58 +01:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
2023-09-04 17:03:44 +02:00
|
|
|
uses: actions/setup-go@v4
|
2022-01-17 14:01:58 +01:00
|
|
|
with:
|
2023-04-27 17:50:45 +02:00
|
|
|
go-version: "1.20.x"
|
2022-01-17 14:01:58 +01:00
|
|
|
- name: Checkout code
|
2023-09-04 17:03:44 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-01-17 14:01:58 +01:00
|
|
|
|
|
|
|
- name: Cache Go modules
|
2023-09-04 17:03:44 +02:00
|
|
|
uses: actions/cache@v3
|
2022-01-17 14:01:58 +01:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: macos-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
macos-go-
|
|
|
|
|
|
|
|
- name: Install modules
|
|
|
|
run: go mod tidy
|
|
|
|
|
|
|
|
- name: Test
|
2023-10-16 11:19:39 +02:00
|
|
|
run: NETBIRD_STORE_ENGINE=${{ matrix.store }} go test -exec 'sudo --preserve-env=CI' -timeout 5m -p 1 ./...
|