Now what #31
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: Deployment Tests | |
on: [push, pull_request] | |
jobs: | |
core: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
name: Vite SSR | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
# node setup | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
# We don't want to install until later, | |
# when the cache and Cypress are in place | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build packages | |
run: pnpm build:deps && pnpm build:components | |
- name: Start backend | |
run: make start-backend-docker-detached | |
- name: Build | |
run: pnpm --filter plone-vite-ssr build | |
- name: Start server | |
run: nohup pnpm --filter plone-vite-ssr start:prod & | |
- name: Run tests | |
run: curl http://localhost:3000 || true | |
- name: Run tests | |
run: wget http://localhost:3000 || true | |
- name: Stop backend | |
run: make stop-backend-docker-detached |