Skip to content

[WIP] migrate all plugins to ESM (requires Eleventy 3.0.0) #89

[WIP] migrate all plugins to ESM (requires Eleventy 3.0.0)

[WIP] migrate all plugins to ESM (requires Eleventy 3.0.0) #89

Workflow file for this run

name: 'CI'
on:
pull_request:
push:
branches:
- canary
- main
jobs:
build-audit-test:
name: Build & Test all packages on ${{ matrix.os }}, Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# Test all packages with:
# 1. Maintenance LTS
# 2. Active LTS
# 3. Current (i.e. the latest Node.js version available)
# https://nodejs.org/en/about/releases/
node: ['lts/gallium', 'lts/hydrogen', 'current']
eleventy: ['2.0.0']
steps:
- name: πŸ›ŽοΈ Checkout repo
uses: actions/checkout@v3
- name: βš™οΈ Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: ⬇️ Install dependencies
run: npm ci
- name: ⬇️ Install Eleventy ${{ matrix.eleventy }}
run: npm install @11ty/eleventy@${{ matrix.eleventy }}
- name: πŸ›‘οΈ Audit dependencies (audit-level high)
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level
run: npm audit --audit-level high
- name: πŸ›‘οΈ Audit dependencies (audit-level moderate)
continue-on-error: true
run: npm audit --audit-level moderate
- name: πŸ“¦ Build all libraries
run: npm run build:libs
- name: πŸ” Test @jackdbd/eleventy-plugin-content-security-policy
run: npm run test:ci -w packages/eleventy-plugin-content-security-policy
- name: πŸ” Test @jackdbd/eleventy-plugin-ensure-env-vars
env:
NODE_ENV: test
run: npm run test:ci -w packages/eleventy-plugin-ensure-env-vars
- name: πŸ” Test @jackdbd/eleventy-plugin-permissions-policy
run: npm run test:ci -w packages/eleventy-plugin-permissions-policy
- name: πŸ” Test @jackdbd/eleventy-plugin-telegram
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/eleventy-plugin-telegram
- name: πŸ” Test @jackdbd/eleventy-plugin-text-to-speech
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/eleventy-plugin-text-to-speech
- name: ⬆️ Upload test coverage to Codecov
# https://github.com/marketplace/actions/codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
# fail_ci_if_error: false
fail_ci_if_error: true
verbose: true