fix: ignore gitkeep files in migration directory #202
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 Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - blizzard | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: | |
| - "1.23" | |
| - "1.24" | |
| mongo-version: | |
| - "6.0" | |
| - "8.0" | |
| name: Go ${{ matrix.go-version }} x MongoDB ${{ matrix.mongo-version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Disable Go toolchain auto-upgrade | |
| run: | | |
| echo "GOTOOLCHAIN=local" >> $GITHUB_ENV | |
| sed -i 's/^go 1.24$/go ${{ matrix.go-version }}/' go.mod | |
| - name: Set up Golang ${{ matrix.go-version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Start default MongoDB cluster | |
| uses: supercharge/mongodb-github-action@1.12.0 | |
| with: | |
| mongodb-version: ${{ matrix.mongo-version }} | |
| mongodb-replica-set: rs0 | |
| mongodb-container-name: mongo-rs0 | |
| mongodb-port: 27017 | |
| - name: Start secondary MongoDB cluster | |
| uses: supercharge/mongodb-github-action@1.12.0 | |
| with: | |
| mongodb-version: ${{ matrix.mongo-version }} | |
| mongodb-replica-set: rs1 | |
| mongodb-container-name: mongo-rs1 | |
| mongodb-port: 27018 | |
| - name: Install dependencies | |
| run: go mod tidy | |
| - name: Run tests | |
| run: make test-coverage | |
| env: | |
| DEFAULT_DATASOURCE: mongodb://127.0.0.1:27017/elemental?replicaSet=rs0 | |
| SECONDARY_DATASOURCE: mongodb://127.0.0.1:27018/elemental?replicaSet=rs1 | |
| GOEXPERIMENT: ${{ matrix.go-version == '1.23' && 'aliastypeparams' || '' }} | |
| GODEBUG: ${{ matrix.go-version == '1.23' && 'gotypesalias=1' || '' }} | |
| - name: Upload coverage report | |
| if: github.event_name == 'pull_request' && github.base_ref == 'main' && matrix.go-version == '1.24' && matrix.mongo-version == '8.0' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/coverage.out |