Bump turbo from 1.8.3 to 2.5.4 #869
Workflow file for this run
This file contains hidden or 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
database: | |
image: mysql:5.7 | |
env: | |
MYSQL_DATABASE: drupal | |
MYSQL_USER: drupal | |
MYSQL_PASSWORD: drupal | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10 | |
drupal: | |
image: phenaproxima/acquia_cms:headless | |
ports: | |
- 80:80 | |
options: --name drupal | |
strategy: | |
matrix: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Import database | |
run: | | |
docker cp ./drupal/settings.ci.php drupal:/opt/drupal/web/sites/default/settings.local.php | |
docker exec drupal ./import-db | |
- name: Ensure Drupal is installed | |
run: | | |
curl --fail http://localhost/jsonapi | |
docker exec drupal drush status | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install npm and yarn | |
run: | | |
npm --version | |
npm -g install yarn | |
# Copied from https://github.com/actions/cache/blob/main/examples.md#node---yarn | |
- name: Get Yarn cache path | |
id: yarn-cache-dir | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# See https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions | |
- name: Install Yarn dependencies | |
run: yarn install --frozen-lockfile --prefer-offline | |
- run: yarn prettier --check . | |
- run: yarn run lint | |
- name: Run jest unit tests | |
run: yarn run test:jest | |
- name: Build and start application | |
run: | | |
docker cp drupal:/opt/drupal/.env ./starters/basic-starter/.env.local | |
yarn build | |
yarn dev & | |
sleep 8 | |
curl --fail http://localhost:3000 | |
- name: Run end-to-end tests | |
run: docker run --volume $PWD:/e2e --workdir /e2e --add-host host.docker.internal:host-gateway cypress/included:10.3.1 --config baseUrl=http://host.docker.internal:3000,video=false |