Merge pull request #114 from WazedKhan/961-n-repeated-element #113
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: Python and Go Tests | |
| on: push | |
| jobs: | |
| python-tests: | |
| name: Run Python Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12.3" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run pytest | |
| run: | | |
| pytest | |
| go-tests: | |
| name: Run Go Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Go | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.3' | |
| - name: Verify dependencies | |
| run: | | |
| go mod tidy | |
| go mod verify | |
| - name: Run go fmt and vet | |
| run: | | |
| go fmt ./... | |
| go vet ./... | |
| - name: Run unit tests with coverage | |
| run: | | |
| go test -v -race -coverprofile=coverage.out ./... | |
| - name: Show coverage summary | |
| run: | | |
| go tool cover -func=coverage.out | |
| - name: Upload coverage report artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: go-coverage-report | |
| path: Go/coverage.out |