feat: Add peer dependency of triple-web-to-native-interfaces #14019
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: CI | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags-ignore: | |
| - '**' | |
| env: | |
| # Node.js | |
| NODE_VERSION: 'lts/*' | |
| PNPM_VERSION: '9' | |
| NPM_REGISTRY_URL: 'https://registry.npmjs.org' | |
| NODE_AUTH_TOKEN: ${{ secrets.READ_ONLY_NPM_TOKEN }} | |
| HUSKY: 0 | |
| # Nx Cloud | |
| NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
| jobs: | |
| check-dependencies: | |
| runs-on: ${{ vars.NOL_RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: ${{ env.NPM_REGISTRY_URL }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: If working tree dirty, shutdown job | |
| id: check-working-tree-clean | |
| run: | | |
| if [[ $(git diff --stat) != '' ]]; then | |
| git diff --stat | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ${{ vars.NOL_RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: ${{ env.NPM_REGISTRY_URL }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Lint | |
| id: lint | |
| run: pnpm run lint | |
| build: | |
| runs-on: ${{ vars.NOL_RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: ${{ env.NPM_REGISTRY_URL }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Build | |
| id: build | |
| run: pnpm run build | |
| test: | |
| runs-on: ${{ vars.NOL_RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: ${{ env.NPM_REGISTRY_URL }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Generate coverage report | |
| id: test | |
| run: pnpm run test:coverage -- --ci --reporters github-actions --reporters summary --maxWorkers 2 | |
| - name: Upload coverage to Codecov | |
| id: upload-coverage-to-codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./coverage | |
| chromatic-deployment: | |
| runs-on: ${{ vars.NOL_RUNNER }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: ${{ env.NPM_REGISTRY_URL }} | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Publish to Chromatic | |
| if: github.ref != 'refs/heads/main' | |
| id: publish-to-chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| zip: true | |
| - name: Publish to Chromatic and auto accept changes | |
| if: github.ref == 'refs/heads/main' | |
| uses: chromaui/action@latest | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| autoAcceptChanges: true |