Skip to content

Test env variables from GutHub Actions #26

Test env variables from GutHub Actions

Test env variables from GutHub Actions #26

Workflow file for this run

name: Test app console
on:
push:
branches: [ "runchecks" ]
pull_request:
branches: [ "runchecks" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
# services:
# db:
# image: mysql
# env:
# MYSQL_ROOT_PASSWORD: ${{env.MYSQL_ROOT_PASSWORD}}
# MYSQL_DATABASE: ${{env.MYSQL_ROOT_PASSWORD}}
# MYSQL_USER: ${{env.MYSQL_ROOT_PASSWORD}}
# MYSQL_PASSWORD: ${{env.MYSQL_ROOT_PASSWORD}}
# ports:
# - 3306:3306
steps:
- name: Look variables
run: |

Check failure on line 30 in .github/workflows/app-console.yml

View workflow run for this annotation

GitHub Actions / Test app console

Invalid workflow file

The workflow is not valid. .github/workflows/app-console.yml (Line: 30, Col: 12): Unrecognized named-value: 'MYSQL_ROOT_PASSWORD'. Located at position 1 within expression: MYSQL_ROOT_PASSWORD
echo "value: ${{MYSQL_ROOT_PASSWORD}}" && false
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 db" | sudo tee -a /etc/hosts
- name: Check DB connection
run: mysql -uroot -pchangeme -hdb -P3306 demo
- uses: actions/checkout@v2
with:
ref: runchecks
- name: Install dependencies
uses: php-actions/composer@v6
with:
working_dir: app/
# Validate app console
- name: Validate app-console
run: bin/console
working-directory: app/
# Code style
- name: Check code style
run: bin/test-codestyle
working-directory: app/
# Generators
- name: Check generators
run: bin/test-generators
working-directory: app/
# PHP Stan
- name: PHP Stan
run: bin/test-phpstan
working-directory: app/
# Schema
- name: PHP Schema
run: bin/test-schema
working-directory: app/