Repository navigation
Version Packages (next) #4586
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: "Package CI" | |
| permissions: | |
| statuses: write | |
| checks: write | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "yarn" | |
| cache-dependency-path: "**/yarn.lock" | |
| - name: Restore Node.js dependencies | |
| run: yarn install --immutable | |
| - name: Restore package.json | |
| # This step is necessary because the previous step may have updated package.json | |
| run: git checkout -- package.json packages/*/package.json | |
| - name: Check release channel safeguards | |
| run: yarn test:release | |
| - name: Install Playwright Browsers | |
| run: yarn playwright install --with-deps | |
| working-directory: ./packages/browser-sdk | |
| - id: build | |
| name: Build the project | |
| run: yarn build | |
| - name: Build docs | |
| run: yarn docs | |
| - id: test | |
| name: Test the project | |
| run: yarn test:ci | |
| - name: Check standalone examples | |
| run: | | |
| for example in packages/node-sdk/examples/cloudflare-worker packages/openfeature-node-provider/example; do | |
| (cd "$example" && yarn install --immutable && yarn build && yarn test:ci) | |
| done | |
| - name: Report test results | |
| uses: dorny/test-reporter@v1.6.0 | |
| # Reporting only. Failing tests already fail the "Test the project" | |
| # step; a reporter API error (seen on merge queue commits) shouldn't | |
| # fail the required "Build & Test" job. | |
| continue-on-error: true | |
| with: | |
| name: Build & Test Report | |
| path: ./packages/*/junit.xml | |
| reporter: jest-junit | |
| - id: fmt | |
| name: Check formatting | |
| run: yarn fmt | |
| - id: lint | |
| name: Check for linting errors | |
| run: yarn lint:ci |