mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Migrated production build test from Admin
refs https://github.com/TryGhost/Toolbox/issues/365 - the .github/workflows/test.yml in Admin needed to be merged with the top-level GHA folder so this test needed porting - there is still the browser matrix testing to port once things are stable
This commit is contained in:
parent
425473ff88
commit
b0a776fd25
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@ -35,6 +35,26 @@ jobs:
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
prod-build:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||
name: Admin - Production Build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.17.0"
|
||||
|
||||
- run: yarn
|
||||
- run: yarn workspace ghost-admin run grunt shell:ember:prod
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
migrations:
|
||||
runs-on: ubuntu-18.04
|
||||
defaults:
|
||||
|
96
ghost/admin/.github/workflows/test.yml
vendored
96
ghost/admin/.github/workflows/test.yml
vendored
@ -1,96 +0,0 @@
|
||||
name: Test Suite
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- "v4.*"
|
||||
- "5.0"
|
||||
- "multiple-newsletters"
|
||||
- main
|
||||
- "renovate/*"
|
||||
jobs:
|
||||
prod-build:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||
name: Production Build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.17.0"
|
||||
|
||||
- run: yarn
|
||||
- run: grunt shell:ember:prod
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||
name: Lint
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.17.0"
|
||||
|
||||
- run: yarn
|
||||
- run: yarn lint:js
|
||||
- run: yarn lint:hbs
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||
strategy:
|
||||
matrix:
|
||||
browser: ["Firefox", "Chrome"]
|
||||
name: ${{ matrix.browser }}
|
||||
env:
|
||||
MOZ_HEADLESS: 1
|
||||
JOBS: 1
|
||||
CI: true
|
||||
COVERAGE: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "14.17.0"
|
||||
|
||||
- run: yarn
|
||||
- run: yarn test
|
||||
env:
|
||||
BROWSER: ${{ matrix.browser }}
|
||||
|
||||
# Merge coverage reports and upload
|
||||
- run: yarn ember coverage-merge
|
||||
- uses: codecov/codecov-action@v3
|
||||
|
||||
- uses: daniellockyer/action-slack-build@master
|
||||
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
canary:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: [lint, test, prod-build]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
name: Canary
|
||||
steps:
|
||||
- name: Invoke Canary Build
|
||||
uses: benc-uk/workflow-dispatch@v1
|
||||
with:
|
||||
workflow: Canary Build
|
||||
repo: TryGhost/Ghost
|
||||
token: ${{ secrets.WORKFLOW_TOKEN }}
|
Loading…
Reference in New Issue
Block a user