chore: bump version to 2.0.0 #71
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags-ignore: | |
| - "**" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| if: >- | |
| ${{ github.event_name != 'push' || | |
| !startsWith(github.event.head_commit.message, 'chore: bump version') }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run tests | |
| run: ./gradlew test | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: build/reports/tests/test/ | |
| live-test: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: >- | |
| ${{ needs.test.result == 'success' && | |
| (github.event_name != 'push' || | |
| !startsWith(github.event.head_commit.message, 'chore: bump version')) && | |
| (github.event_name != 'pull_request' || | |
| github.event.pull_request.head.repo.full_name == github.repository) }} | |
| env: | |
| OPENCODE_TEST_AUTH_JSON: ${{ secrets.OPENCODE_TEST_AUTH_JSON }} | |
| OPENCODE_TEST_VERSIONS: ${{ vars.OPENCODE_TEST_VERSIONS }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check live test configuration | |
| run: | | |
| if [ -n "$OPENCODE_TEST_AUTH_JSON" ] && [ -n "$OPENCODE_TEST_VERSIONS" ]; then | |
| exit 0 | |
| else | |
| echo "OPENCODE_TEST_AUTH_JSON secret and OPENCODE_TEST_VERSIONS variable must be configured for push workflows and same-repo PRs." >&2 | |
| exit 1 | |
| fi | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run live tests | |
| run: ./gradlew liveTest | |
| - name: Upload live test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: live-test-results | |
| path: | | |
| build/reports/tests/liveTest/ | |
| .cache/opencode-test/runs/ | |
| if-no-files-found: ignore |