Skip to content

Merge pull request #298 from gfscott/everything-config #461

Merge pull request #298 from gfscott/everything-config

Merge pull request #298 from gfscott/everything-config #461

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- '.changeset/*.md'
jobs:
unit_tests:
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
node: ["18", "20", "22"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests using ava
run: pnpm test
# end_to_end_tests:
# name: Run e2e tests
# runs-on: "ubuntu-latest"
# needs: unit_tests
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# - name: Install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: "20"
# cache: 'pnpm'
# - name: Install dependencies
# run: pnpm install
# - name: Install Playwright browser dependencies
# run: pnpm playwright install --with-deps
# - name: Run end-to-end tests using Playwright
# run: "pnpm test:e2e"
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: playwright-report
# # currently only youtube is being e2e tested
# # TODO figure out how to handle this with multiple packages
# path: packages/youtube/playwright-report/
# retention-days: 30
code_coverage:
name: Check test coverage
runs-on: "ubuntu-latest"
needs: unit_tests
# Only run on the main repo, not forks
if: github.repository == 'gfscott/eleventy-plugin-embed-everything'
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests using ava
run: pnpm coverage
- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v4