Ghost/ghost/admin/.github/workflows/test.yml
Gabriel Csapo beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00

95 lines
2.7 KiB
YAML

name: Test Suite
on:
pull_request:
push:
branches:
- "v4.*"
- 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@v2
- uses: actions/setup-node@v2
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@v2
- uses: actions/setup-node@v2
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@v2
- uses: actions/setup-node@v2
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@v2
- 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 }}