feat: implement Mux badge #3561
Workflow file for this run
This file contains 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, pull_request] | |
# To use Turborepo Remote Caching, set the following environment variables. | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
jobs: | |
build: | |
# Don't run if the CI is triggered by Release Please | |
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: read node version from the .nvmrc file | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
shell: bash | |
id: nvmrc | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{steps.nvmrc.outputs.NODE_VERSION}} | |
# this line is required for the setup-node action to be able to run the npm publish below. | |
registry-url: 'https://registry.npmjs.org' | |
cache: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn clean | |
- run: yarn build:packages | |
- run: npx --yes -w packages wet-run@1.2.5 release prerelease --prerelease canary --provenance --log-level verbose | |
if: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
lint: | |
# Don't run if the CI is triggered by Release Please | |
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: read node version from the .nvmrc file | |
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
shell: bash | |
id: nvmrc | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{steps.nvmrc.outputs.NODE_VERSION}} | |
cache: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint | |
test: | |
# Don't run if the CI is triggered by Release Please | |
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
# esbuild requires --ignore-scripts to NOT be added here. | |
- run: yarn install --frozen-lockfile | |
- run: yarn clean | |
- name: Install playwright browsers | |
run: npx playwright install --with-deps | |
# Retry the test command up to 3 times with a timeout of 10 minutes | |
- uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
# run yarn and pass through `-- --all` to turborepo | |
command: yarn test -- -- --all | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2.1.0 | |
with: | |
verbose: true |