chore: fix for hook-logs #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Tests | |
| on: | |
| push: | |
| branches: [latest] | |
| paths: | |
| - '**.go' | |
| - '.github/workflows/test.yml' | |
| - 'scripts/unit_test.sh' | |
| - 'examples/acme.yml' | |
| pull_request: | |
| branches: [latest] | |
| paths: | |
| - '**.go' | |
| - '.github/workflows/test.yml' | |
| - 'scripts/unit_test.sh' | |
| - 'examples/acme.yml' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Restore Go Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: | | |
| sudo apt install git | |
| go install gotest.tools/gotestsum@latest | |
| - name: Download module-dependencies | |
| run: go mod tidy | |
| - name: Building Go Binary | |
| run: bash scripts/build.sh | |
| env: | |
| MODE_TEST: '1' | |
| - name: Running Unit-Tests | |
| run: bash scripts/unit_test.sh | |
| - name: Testing validation-mode | |
| run: ./build/acme -c $(pwd)/examples/acme.yml -validate | |
| - name: Testing check-mode | |
| run: | | |
| mkdir -p /tmp/acme-certs /tmp/acme-www/.well-known/acme-challenge | |
| ./build/acme -c $(pwd)/examples/acme.yml -check |