ci: combine into one file cuz me dumdum
This commit is contained in:
parent
0e1ecd231e
commit
f80b77cc8d
2 changed files with 33 additions and 62 deletions
40
.github/workflows/deploy.yml
vendored
40
.github/workflows/deploy.yml
vendored
|
@ -1,11 +1,11 @@
|
||||||
# Deploy sites in firebase.json
|
name: Build, Test, and Deploy
|
||||||
|
|
||||||
name: Deploy pages
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
push:
|
||||||
workflows: ["Test"]
|
branches:
|
||||||
types:
|
- master
|
||||||
- completed
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
if: ${{ github.repository_owner == 'developomp' }}
|
if: ${{ github.repository_owner == 'developomp' }}
|
||||||
|
@ -25,12 +25,38 @@ jobs:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Store Playwright's Version
|
||||||
|
run: |
|
||||||
|
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
|
||||||
|
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
|
||||||
|
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Cache Playwright Browsers for Playwright's Version
|
||||||
|
id: cache-playwright-browsers
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Install playwright browsers
|
||||||
|
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
|
||||||
|
run: npx playwright install --with-deps
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: pnpm test:e2e
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: test-results
|
||||||
|
path: |
|
||||||
|
apps/*/test-results
|
||||||
|
|
||||||
- name: Deploy to Firebase
|
- name: Deploy to Firebase
|
||||||
uses: w9jds/firebase-action@master
|
uses: w9jds/firebase-action@master
|
||||||
with:
|
with:
|
||||||
|
|
55
.github/workflows/test.yml
vendored
55
.github/workflows/test.yml
vendored
|
@ -1,55 +0,0 @@
|
||||||
name: Test
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
if: ${{ github.repository_owner == 'developomp' }}
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: 8
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Store Playwright's Version
|
|
||||||
run: |
|
|
||||||
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
|
|
||||||
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
|
|
||||||
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Cache Playwright Browsers for Playwright's Version
|
|
||||||
id: cache-playwright-browsers
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.cache/ms-playwright
|
|
||||||
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Install playwright browsers
|
|
||||||
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: pnpm test:e2e
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: test-results
|
|
||||||
path: |
|
|
||||||
apps/*/test-results
|
|
Loading…
Add table
Add a link
Reference in a new issue