2021-07-22 15:51:07 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2021-09-15 04:23:39 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '.vscode/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'examples/**'
|
|
|
|
- 'www/**'
|
2021-07-22 15:51:07 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
node_version: [12, 14, 16]
|
2021-09-23 23:02:23 +00:00
|
|
|
# TODO: uncomment this (Vite has trouble resolving imports on Windows)
|
|
|
|
# include:
|
|
|
|
# - os: windows-latest
|
|
|
|
# node_version: 14
|
2021-07-22 15:51:07 +00:00
|
|
|
fail-fast: false
|
2021-09-21 18:28:23 +00:00
|
|
|
env:
|
|
|
|
LANG: en-us
|
2021-07-22 22:38:21 +00:00
|
|
|
name: 'Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
|
2021-07-22 15:51:07 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set node version to ${{ matrix.node_version }}
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node_version }}
|
|
|
|
|
|
|
|
- name: Get yarn cache directory
|
|
|
|
id: yarn-cache
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
- name: Set dependencies cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
${{ runner.os }}-${{ matrix.node_version }}-
|
|
|
|
|
|
|
|
- name: Debug
|
|
|
|
run: yarn versions
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install --frozen-lockfile --ignore-engines
|
|
|
|
|
2021-08-11 23:31:02 +00:00
|
|
|
- name: Build Astro
|
2021-07-22 15:51:07 +00:00
|
|
|
run: yarn build:all
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: yarn test
|
|
|
|
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
2021-07-22 22:38:21 +00:00
|
|
|
name: 'Lint: node-14, ubuntu-latest'
|
2021-07-22 15:51:07 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set node version to 14
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
|
|
|
|
- name: Get yarn cache directory
|
|
|
|
id: yarn-cache
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
- name: Set dependencies cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
${{ runner.os }}-${{ matrix.node_version }}-
|
|
|
|
|
|
|
|
- name: Debug
|
|
|
|
run: yarn versions
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install --frozen-lockfile --ignore-engines
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: yarn build:all
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
2021-08-12 08:41:44 +00:00
|
|
|
|
2021-09-23 23:02:23 +00:00
|
|
|
# NOTE: temporarily disabled until `next` branch can build docs again
|
|
|
|
#
|
|
|
|
# smoke:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# name: 'Smoke: node-14, ubuntu-latest'
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
# with:
|
|
|
|
# fetch-depth: 0
|
|
|
|
|
|
|
|
# - name: Set node version to 14
|
|
|
|
# uses: actions/setup-node@v2
|
|
|
|
# with:
|
|
|
|
# node-version: 14
|
|
|
|
|
|
|
|
# - name: Get yarn cache directory
|
|
|
|
# id: yarn-cache
|
|
|
|
# run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
# - name: Set dependencies cache
|
|
|
|
# uses: actions/cache@v2
|
|
|
|
# with:
|
|
|
|
# path: ${{ steps.yarn-cache.outputs.dir }}
|
|
|
|
# key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
# restore-keys: |
|
|
|
|
# ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }}
|
|
|
|
# ${{ runner.os }}-${{ matrix.node_version }}-
|
|
|
|
|
|
|
|
# - name: Debug
|
|
|
|
# run: yarn versions
|
|
|
|
|
|
|
|
# - name: Install dependencies
|
|
|
|
# run: yarn install --frozen-lockfile --ignore-engines
|
|
|
|
|
|
|
|
# - name: Build
|
|
|
|
# run: yarn build:all
|
|
|
|
|
|
|
|
# - name: "Smoke Test: Build 'docs'"
|
|
|
|
# run: yarn build
|
|
|
|
# working-directory: ./docs
|
|
|
|
|
|
|
|
# - name: "Smoke Test: Build 'www'"
|
|
|
|
# run: yarn build
|
|
|
|
# working-directory: ./www
|