diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-17 00:18:20 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-17 00:18:20 +0900 |
| commit | dd78728fb3f35a3f858b281a64c0803089a86f66 (patch) | |
| tree | 4b6a8294386b6271aad6175dca7d87e433edf9a2 /.gitea | |
| parent | 354c23dd28d9996dd2c553243cfbe3358b35ea80 (diff) | |
workflows: test workflow to run tests every commit
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to '.gitea')
| -rw-r--r-- | .gitea/workflows/test.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 00000000..fd493aff --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,37 @@ +name: test + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup go + uses: https://github.com/actions/setup-go@v5 + with: + go-version: '>=1.23.0' + + - name: Get dependencies + run: >- + sudo apt-get update && + sudo apt-get install -y + gcc + pkg-config + libacl1-dev + if: ${{ runner.os == 'Linux' }} + + - name: Run tests + run: >- + go test ./... + + - name: Build for Linux + run: >- + sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/fortify && + sha256sum --tag -b bin/fortify > bin/fortify.sha256" |
