Use env var directly without reassign #13
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: Lint and Test | |
on: push | |
jobs: | |
lint: | |
name: Lint and Test | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
tools: composer:v2 | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache Composer packages | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ hashFiles( 'composer.lock' ) }} | |
restore-keys: ${{ runner.os }}-php- | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install NPM dependencies | |
run: npm install | |
- name: Install Composer dependencies | |
run: composer install | |
- name: Lint | |
run: npm run lint | |
- name: Pull custom Docker images | |
run: docker compose pull wordpress | |
- name: Test | |
run: npm run test | |
- name: Build | |
run: npm run build |