Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/actions/install-wordpress/action.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/actions/setup/action.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/deploy.yml

This file was deleted.

14 changes: 11 additions & 3 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Production
name: 'Deploy: Production'
on:
workflow_dispatch:
inputs:
Expand All @@ -7,10 +7,18 @@ on:
required: true
default: '-vv'

permissions:
contents: read

jobs:
deploy:
uses: ./.github/workflows/deploy.yml
secrets: inherit
uses: generoi/github-actions/.github/workflows/deploy.yml@v2
secrets:
# The shared workflow expects DEPLOY_SSH_PRIVATE_KEY; this repo's secret
# predates that name.
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.KINSTA_DEPLOY_PRIVATE_KEY }}
NPM_FONTAWESOME_AUTH_TOKEN: ${{ secrets.NPM_FONTAWESOME_AUTH_TOKEN }}
COMPOSER_BOT_PRIVATE_KEY: ${{ secrets.COMPOSER_BOT_PRIVATE_KEY }}
with:
environment: 'production'
log_level: ${{ inputs.log_level }}
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Staging
name: 'Deploy: Staging'
on:
workflow_dispatch:
inputs:
Expand All @@ -7,10 +7,18 @@ on:
required: true
default: '-vv'

permissions:
contents: read

jobs:
deploy:
uses: ./.github/workflows/deploy.yml
secrets: inherit
uses: generoi/github-actions/.github/workflows/deploy.yml@v2
secrets:
# The shared workflow expects DEPLOY_SSH_PRIVATE_KEY; this repo's secret
# predates that name.
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.KINSTA_DEPLOY_PRIVATE_KEY }}
NPM_FONTAWESOME_AUTH_TOKEN: ${{ secrets.NPM_FONTAWESOME_AUTH_TOKEN }}
COMPOSER_BOT_PRIVATE_KEY: ${{ secrets.COMPOSER_BOT_PRIVATE_KEY }}
with:
environment: 'staging'
log_level: ${{ inputs.log_level }}
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E tests
name: 'CI: E2E'
on:
workflow_dispatch:
inputs:
Expand All @@ -10,24 +10,12 @@ on:
url:
required: true
type: string
jobs:
e2e:
name: Run E2E tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set URL as environmnet variable so playwright uses it
run: echo "URL=${{ inputs.url }}" >> $GITHUB_ENV

- name: Install dependencies
run: npm run e2e:install
permissions:
contents: read

- name: Run E2E tests
run: npm run e2e:test

- uses: actions/upload-artifact@v4
with:
name: Screenshot
path: screenshot.jpg
jobs:
e2e:
uses: generoi/github-actions/.github/workflows/e2e.yml@v2
with:
url: ${{ inputs.url }}
40 changes: 10 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
name: Test
name: "CI: Test"
on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup project
uses: ./.github/actions/setup
with:
npm_fontawesome_auth_token: ${{ secrets.NPM_FONTAWESOME_AUTH_TOKEN }}
packagist_github_token: ${{ secrets.PACKAGIST_GITHUB_TOKEN }}

- name: Install development packages to run tests
run: composer install:development

- name: Run CI tests
run: composer ci --no-interaction

- name: Install WordPress
uses: ./.github/actions/install-wordpress

- name: Optimize acorn
run: ./vendor/bin/wp acorn optimize

- name: Load frontpage and verify app.js script is loaded
run: curl http://localhost:8080/ | grep '<script.*src=".*app/themes/gds/public/scripts/app.js'

- name: Run unit tests
run: composer phpunit
uses: generoi/github-actions/.github/workflows/test.yml@v2
secrets:
NPM_FONTAWESOME_AUTH_TOKEN: ${{ secrets.NPM_FONTAWESOME_AUTH_TOKEN }}
COMPOSER_BOT_PRIVATE_KEY: ${{ secrets.COMPOSER_BOT_PRIVATE_KEY }}
with:
smoke_grep: 'app/themes/gds/public/scripts/app.js'
Loading