Fix build, lint, and (most) test targets on Windows
#3035
Workflow file for this run
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: Node.js CI | |
| on: | |
| push: | |
| branches: [main, '[0-9]+.x'] | |
| pull_request: | |
| branches: ['**'] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Lint | |
| run: yarn lint | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Unit tests | |
| run: yarn test:ci:unit | |
| e2e-tests: | |
| name: E2E Tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22] | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v3 | |
| continue-on-error: true | |
| with: | |
| gradle-version: 'current' | |
| - uses: ruby/setup-ruby@v1 | |
| if: runner.os == 'macOS' | |
| with: | |
| ruby-version: '2.7.6' | |
| - uses: actions/setup-python@v4 | |
| if: runner.os == 'macOS' | |
| with: | |
| python-version: '3.10' | |
| - name: Add msbuild to PATH | |
| if: runner.os == 'windows' | |
| uses: microsoft/setup-msbuild@v1.3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: yarn | |
| - name: Setup Git user | |
| run: | | |
| git config --global user.name "test" | |
| git config --global user.email "test@test.com" | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Check Gradle availability | |
| run: | | |
| echo "GRADLE_HOME=$GRADLE_HOME" | |
| which gradle || echo "gradle not on PATH" | |
| gradle --version || echo "gradle --version failed" | |
| - name: E2E tests | |
| run: | | |
| yarn test:ci:e2e 2>&1 | tee /tmp/e2e_output.txt; status=${PIPESTATUS[0]} | |
| echo "## E2E Test Output" >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| tail -200 /tmp/e2e_output.txt >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| exit $status |