Group task output in GitHub Actions #16
Workflow file for this run
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
name: Test | |
on: | |
push: | |
env: | |
# Group output as init makes heavy use of parallel and nested tasks. | |
TASK_OUTPUT: "--output group --output-group-begin '::group::{{.TASK}}' --output-group-end '::endgroup::'" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
# Do not test on OSX due to problems installing Docker | |
#- macos-latest | |
# Do not test on Windows. Developers are expected to use WSL. | |
#- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
# TODO replace which with what can be read from .nvmrc if we get a | |
# separation between checkout and install | |
node-version: 'lts/*' | |
registry-url: 'https://npm.pkg.github.com' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# This task has potential for running Docker on other platforms. | |
# It runs but there a Docker related errors downstream anyway, | |
# - name: Set up Docker | |
# uses: crazy-max/ghaction-setup-docker@v2 | |
- name: Setup go-task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Initialize environment | |
run: "task init ${{ env.TASK_OUTPUT }}" | |
- name: Link Design system to React components | |
run: "task react:link ${{ env.TASK_OUTPUT }}" | |
- name: Link Design system and React components to CMS | |
run: "task cms:link ${{ env.TASK_OUTPUT }}" | |
- name: Link Design system to React components (again) | |
run: "task react:link ${{ env.TASK_OUTPUT }}" | |
- name: Link Design system and React components to CMS (again) | |
run: "task cms:link ${{ env.TASK_OUTPUT }}" | |
- name: Test React components after linking | |
uses: cypress-io/github-action@v6 | |
with: | |
start: yarn start:storybook:test | |
wait-on: "http://localhost:57021" | |
browser: chrome | |
working-directory: react | |
# A single test should be sufficient to ensure that Storybook can | |
# start, the React components work etc. after linking. | |
# The demo modal test is simple and quick to execute. | |
spec: src/apps/demo-modal/demo-modal.test.ts | |
- name: Test CMS | |
# A single request to see that the frontpage can be retrieved should be | |
# sufficient to ensure that Drupal can bootstrap and return a page. | |
# COMPOSE_PROJECT_NAME must match the value from Dapple Taskfile.yml. | |
run: "curl --fail http://localhost:$(COMPOSE_PROJECT_NAME=dapple docker compose port varnish 8080 | cut -d: -f2)" |