first pass at app dir support #214
Workflow file for this run
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, pull_request] | |
jobs: | |
build: | |
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: ['20.x'] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install deps and build (with cache) | |
uses: bahmutov/npm-install@v1 | |
- name: Build | |
run: yarn workspace next-s3-upload build | |
docs: | |
name: Build the docs site and run tests against its examples | |
runs-on: ubuntu-latest | |
env: | |
S3_UPLOAD_KEY: ${{ secrets.S3_UPLOAD_KEY }} | |
S3_UPLOAD_SECRET: ${{ secrets.S3_UPLOAD_SECRET }} | |
S3_UPLOAD_BUCKET: next-uploads-1 | |
S3_UPLOAD_REGION: us-east-1 | |
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
R2_BUCKET: next-s3-upload | |
SPACES_KEY: ${{ secrets.SPACES_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
SPACES_BUCKET: next-s3-upload | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.9.0 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build addon | |
run: yarn workspace next-s3-upload build | |
- name: Cypress tests | |
uses: cypress-io/github-action@v2 | |
with: | |
install-command: yarn install --frozen-lockfile | |
build: yarn workspace docs-site build | |
start: yarn workspace docs-site start | |
wait-on: "http://localhost:3000" | |
command: yarn workspace docs-site cypress run | |
- name: Upload Cypress Screenshots | |
uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: packages/docs-site/cypress/screenshots | |