From 5c7c59f92ba380278d4fdbdde5866e7ba37ca83c Mon Sep 17 00:00:00 2001 From: o0HalfLife0o <6436073+o0HalfLife0o@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:02:24 +0800 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e531d52..09ff334f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,7 @@ name: Test on: + workflow_dispatch: push: branches: - main @@ -42,3 +43,31 @@ jobs: enableCrossOsArchive: true - name: Test run: go test -timeout 1h -v ./... + + freebsd: + permissions: + contents: read + name: test (freebsd) + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v4 + - name: Restore Cache + uses: actions/cache/restore@v4 + with: + path: resources + key: xray-geodat- + enableCrossOsArchive: true + - name: Start VM + id: vm + uses: vmactions/freebsd-vm@v1 + with: + prepare: | + pkg install -y go123 + pw user add -n action -m + - name: Test + shell: freebsd {0} + run: | + cd $GITHUB_WORKSPACE + go123 version + su action -c 'go123 test -timeout 1h -v ./...'