feat(core): Import release injection code from each module #537
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: Checks | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
jobs: | |
build: | |
name: Build packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn build | |
type-check: | |
needs: build | |
name: Typing check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn check:types | |
formatting-check: | |
name: Formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn check:formatting | |
test-unit: | |
needs: build | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn test:unit | |
test-integration: | |
needs: build | |
name: "Integration Tests (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [ | |
# nx uses a `yargs-parser` versision which isn't compatible with node 10 | |
# "10.24.1", | |
# vite uses optional chaining which isn't compatible with node 12 | |
# "12.22.12", | |
"14.21.1", | |
"16.18.1", | |
"18.12.1", | |
] | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# husky uses fs-extra which needs node >= 14 - we can ignore because its a dev dependency | |
- run: yarn --frozen-lockfile --ignore-engines | |
- run: yarn test:integration | |
test-e2e: | |
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks | |
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well | |
if: | |
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && | |
github.actor != 'dependabot[bot]' | |
needs: build | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.E2E_TESTS_SENTRY_AUTH_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn test:e2e | |
lint: | |
needs: build | |
name: Linter check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
- run: yarn --frozen-lockfile | |
- run: yarn lint | |
artifacts: | |
needs: build | |
name: Upload Artifacts | |
runs-on: ubuntu-latest | |
# Build artifacts are only needed for releasing workflow. | |
if: startsWith(github.ref, 'refs/heads/release/') | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: volta-cli/action@v3 | |
# - name: Check dependency cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ env.CACHED_DEPENDENCY_PATHS }} | |
# key: ${{ needs.job_build.outputs.dependency_cache_key }} | |
# - name: Check build cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ env.CACHED_BUILD_PATHS }} | |
# key: ${{ env.BUILD_CACHE_KEY }} | |
- run: yarn --frozen-lockfile | |
- name: pack | |
run: yarn build:npm | |
- name: archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.sha }} | |
path: | | |
${{ github.workspace }}/packages/*/dist/** | |
${{ github.workspace }}/packages/**/*.tgz |