Merge pull request #7 from shinokada/feat/v1.2.0 #47
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: [ main, master, develop ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| test: | |
| name: Run Tests (Go ${{ matrix.go-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.21', '1.22'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Run tests | |
| run: go test -v ./... | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| # Only run integration tests manually or on main branch | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Run integration tests | |
| run: | | |
| echo "Integration tests require GitHub auth credentials." | |
| echo "To run locally: INTEGRATION=1 go test -v ./..." | |
| echo "Skipping in CI until credentials are configured as secrets." | |
| exit 0 |