Initial playground collection component - no composables yet #2102
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: | |
branches: | |
- 'nuxt3' | |
pull_request: | |
branches-ignore: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [lts/*,latest] | |
include: | |
- node: latest | |
coverage: true | |
lint: true | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable corepack and PNPM | |
run: | | |
corepack enable | |
corepack prepare pnpm@latest --activate | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
# cache: "pnpm" | |
# cache-dependency-path: ./package.json | |
- name: Install dependencies | |
run: pnpm install | |
- name: Prepare | |
run: pnpm run dev:prepare | |
- name: Lint | |
if: matrix.lint | |
run: pnpm run lint | |
- name: Build module | |
run: pnpm run dev:build | |
- name: Enable code coverage | |
if: matrix.coverage | |
run: echo "COVERAGE=1" >> $GITHUB_ENV | |
- name: Unit tests | |
run: | | |
mkdir -p coverage | |
if [ "$COVERAGE" = '1' ]; then | |
pnpm run test:coverage | |
else | |
pnpm run test | |
fi | |
env: | |
CI: true | |
- name: Upload test artifacts | |
if: matrix.coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vitest-logs-unit${{ matrix.node }} | |
path: ./coverage | |
if-no-files-found: error | |
- name: Upload coverage results to Codecov | |
if: matrix.coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
name: vitest-node-${{ matrix.node }} | |
flags: vitest | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/coverage-final.json | |
- name: Audit | |
run: pnpm audit | |
deploy-next: | |
runs-on: ubuntu-latest | |
needs: [test] | |
# if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip-release]') | |
if: github.ref == 'refs/heads/nuxt3' && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip-release]') | |
strategy: | |
matrix: | |
node: [ 20 ] | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "pnpm" | |
- run: pnpm install | |
- run: pnpm dev:prepare | |
- run: pnpm build | |
- name: Release Edge | |
if: | | |
github.ref == 'refs/heads/nuxt3' && | |
github.event_name == 'push' && | |
!contains(github.event.head_commit.message, '[skip-release]') | |
run: ./scripts/release-edge.sh | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
NPM_CONFIG_PROVENANCE: true | |
# e2e: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node: [16] | |
# fail-fast: true | |
# container: cypress/included:10.11.0 | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Install SASS dependencies | |
# run: | | |
# apt-get update | |
# apt-get install -y g++ build-essential | |
# - name: Use Node.js ${{ matrix.node }} | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node }} | |
# - name: Cache Node.js modules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.yarn | |
# key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} | |
# restore-keys: | | |
# ${{ runner.OS }}-node- | |
# ${{ runner.OS }}- | |
# - name: Install dependencies | |
# run: yarn --frozen-lockfile | |
# - name: Start API, Build and Start Demo Application | |
# env: | |
# API_PORT: 3100 | |
# API_URL: http://localhost:3100 | |
# NODE_TLS_REJECT_UNAUTHORIZED: 0 | |
# DISABLE_HTTPS: true | |
# TESTING: true | |
# run: | | |
# yarn api & | |
# yarn run demo:build | |
# yarn run demo:start & | |
# npx wait-on 'http://localhost:3000' | |
# curl -XGET localhost:3000 | |
# - name: Run E2E | |
# env: | |
# CYPRESS_BASE_URL: http://localhost:3000 | |
# run: yarn e2e --record --key=${{secrets.CYPRESS_RECORD_KEY}} |