Fix layering, DRY, and test coverage in accept/update/delete #14
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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install tools | |
| run: make install-tools | |
| - name: Lint | |
| run: make lint | |
| - name: Format | |
| run: make fmt-check | |
| - name: Vet | |
| run: make vet | |
| - name: Test | |
| run: make test-cover | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage.txt | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| integration-offline: | |
| name: Integration (offline) | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dolt | |
| run: sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | bash' | |
| - name: Configure dolt | |
| run: | | |
| dolt config --global --add user.email "ci@wasteland.dev" | |
| dolt config --global --add user.name "CI" | |
| - name: Offline integration tests | |
| run: make test-integration-offline | |
| integration: | |
| name: Integration (DoltHub) | |
| needs: check | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dolt | |
| run: sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | bash' | |
| - name: Integration tests | |
| run: make test-integration |