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:
|
2024-01-08 12:25:35 +01:00
|
|
|
go-version: "1.21.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-
|
|
|
|
|
2024-04-08 18:56:52 +02:00
|
|
|
- name: Install libpcap
|
|
|
|
run: brew install libpcap
|
|
|
|
|
2022-01-17 14:01:58 +01:00
|
|
|
- name: Install modules
|
|
|
|
run: go mod tidy
|
|
|
|
|
2024-02-23 12:00:43 +01:00
|
|
|
- name: check git status
|
|
|
|
run: git --no-pager diff --exit-code
|
|
|
|
|
2022-01-17 14:01:58 +01:00
|
|
|
- name: Test
|
2024-02-20 15:06:32 +01:00
|
|
|
run: NETBIRD_STORE_ENGINE=${{ matrix.store }} go test -exec 'sudo --preserve-env=CI,NETBIRD_STORE_ENGINE' -timeout 5m -p 1 ./...
|