feat: Add minimalytics analytics to website #17
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| run_mod_tests: | |
| description: 'Run full mod build tests' | |
| required: false | |
| default: 'false' | |
| type: boolean | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Run linting | |
| run: make lint | |
| - name: Run unit tests | |
| run: make test | |
| - name: Build binary | |
| run: make build | |
| test-mods: | |
| runs-on: ubuntu-latest | |
| # Run on main branch, manual trigger with run_mod_tests=true, or if PR title contains [test-mods] | |
| if: | | |
| github.ref == 'refs/heads/main' || | |
| github.event.inputs.run_mod_tests == 'true' | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu, fedora, alpine] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Build binary | |
| run: make build | |
| - name: Run mod build tests for ${{ matrix.os }} | |
| run: | | |
| go test -tags=e2e -v -timeout=30m -run "TestModBuilds/${{ matrix.os }}" ./internal/e2e/... | |
| env: | |
| DOCKER_BUILDKIT: 1 |