66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
lint:
|
|
env:
|
|
ASTRO_TELEMETRY_DISABLED: true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2.2.1
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: "pnpm"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Prettier
|
|
run: pnpm run format:check
|
|
|
|
- name: ESLint
|
|
run: pnpm run lint
|
|
|
|
test:
|
|
name: "Test: ${{ matrix.os }} (node@${{ matrix.node_version }})"
|
|
env:
|
|
ASTRO_TELEMETRY_DISABLED: true
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node_version: [14, 16]
|
|
include:
|
|
- os: windows-latest
|
|
node_version: 16
|
|
- os: macos-latest
|
|
node_version: 16
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v2.2.1
|
|
|
|
- name: Setup node@${{ matrix.node_version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node_version }}
|
|
cache: "pnpm"
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Test
|
|
run: pnpm --filter astro-imagetools run test
|