Merge pull request #12 from akihikokuroda/maestrocleanup #11
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: Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.21', '1.22', '1.23'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Make scripts executable | |
| run: | | |
| chmod +x ./build.sh | |
| chmod +x ./test.sh | |
| - name: Build maestro CLI | |
| run: ./build.sh | |
| - name: Run unit tests | |
| run: ./test.sh unit | |
| - name: Run integration tests | |
| run: ./test.sh integration | |
| continue-on-error: true | |
| - name: Run all tests | |
| run: ./test.sh | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.go-version }} | |
| path: | | |
| test-results/ | |
| coverage.out | |
| *.log | |
| retention-days: 30 | |
| - name: Upload test logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs-${{ matrix.go-version }} | |
| path: | | |
| *.log | |
| test-*.txt | |
| retention-days: 7 |