Tabs Improvent #2034
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: Build and test | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: ["develop", "main"] | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
test: | |
name: Build and Test | |
runs-on: 'ubuntu-latest' | |
# To use Remote Caching, uncomment the next lines and follow the steps below. | |
# env: | |
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.16.0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.14.2 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Cache pnpm store and cypress binary | |
with: | |
path: | | |
${{ env.STORE_PATH }} | |
~/.cache/Cypress | |
key: ${{ runner.os }}-cache-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-cache- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build:libs | |
- name: Check types | |
run: pnpm check:types | |
# Note: This takes a while to start after the image is pulled | |
- name: Run theme container | |
run: | | |
echo "${{ secrets.ILO_BASE_THEME_TOKEN }}" | docker login ghcr.io -u "${{ github.repository_owner }}" --password-stdin | |
docker run -d --name theme -p 8082:80 -v "${{ github.workspace }}"/packages/twig/dist/components:/opt/drupal/modules/ilo_base_theme_companion/dist/components -v "${{ github.workspace }}"/packages/twig/dist/styles/index.css:/opt/drupal/modules/ilo_base_theme_companion/dist/index.css ghcr.io/international-labour-organization/ilo_base_theme:1.x | |
- name: Test | |
run: pnpm test:all |