-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1225 from weather-gov/mgwalker/composite-actions
Split tests into composite actions
- Loading branch information
Showing
8 changed files
with
138 additions
and
138 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: prepare playwright | ||
uses: ./.github/actions/setup-playwright | ||
- name: run tests | ||
shell: bash | ||
run: npx playwright test a11y |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: prepare playwright | ||
uses: ./.github/actions/setup-playwright | ||
- name: run tests | ||
shell: bash | ||
run: npx playwright test e2e/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: install dependencies | ||
shell: bash | ||
run: npm ci | ||
|
||
- name: install proxy dependencies | ||
shell: bash | ||
run: cd tests/api && npm ci | ||
|
||
- name: run js-component-tests | ||
shell: bash | ||
run: npm run js-component-tests |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: install dependencies | ||
shell: bash | ||
run: npm ci | ||
|
||
- name: install proxy dependencies | ||
shell: bash | ||
run: cd tests/api && npm ci | ||
|
||
- name: add problem matcher | ||
shell: bash | ||
run: echo "::add-matcher::${{ github.workspace }}/.github/workflows/problem-matcher-eslint.json" | ||
|
||
- name: run eslint | ||
shell: bash | ||
run: npm run js-lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
|
||
- name: get composer paths | ||
id: composer-paths | ||
shell: bash | ||
run: | | ||
echo "cache-dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
echo "bin-dir=${{ github.workspace }}/$(composer config bin-dir)" >> $GITHUB_OUTPUT | ||
- name: cache composer caches | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-paths.outputs.cache-dir }} | ||
key: composer-cache-${{ hashFiles('composer.lock') }} | ||
|
||
- name: install dependencies | ||
env: | ||
COMPOSER_NO_DEV: 0 | ||
shell: bash | ||
run: composer install | ||
|
||
- name: run phpcs | ||
shell: bash | ||
run: | | ||
echo "::add-matcher::${{ github.workspace }}/.github/workflows/problem-matcher-phpcs.json" | ||
vendor/bin/phpcs --report=checkstyle |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: browser-actions/setup-chrome@v1 | ||
- uses: browser-actions/setup-edge@v1 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: install dependencies | ||
shell: bash | ||
run: npm ci | ||
- name: install browsers | ||
shell: bash | ||
run: npx playwright install --with-deps |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
runs: | ||
using: composite | ||
steps: | ||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: install dependencies | ||
shell: bash | ||
run: npm ci | ||
|
||
# Stylelint has a GitHub workflow commands output available by default, | ||
# so we can use that instead of needing a problem matcher. | ||
# https://stylelint.io/user-guide/options#formatter | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions | ||
- name: run stylelint | ||
shell: bash | ||
run: npm run style-lint -- -f github |
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