Skip to content

Commit

Permalink
Fixed 'env' section in github workflow (assigning the env only tho th…
Browse files Browse the repository at this point in the history
…e specific step so that the 'job' is available)
  • Loading branch information
rhertogh committed Nov 12, 2021
1 parent 49bdaa8 commit 8788ef0
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
XDEBUG_MODE: coverage, develop

jobs:
phpunit:
codeception:
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
services:
Expand All @@ -19,7 +19,7 @@ jobs:
MYSQL_USER: Yii2Oauth2ServerTest
MYSQL_PASSWORD: password
ports:
- 3306:3306
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:9.6
Expand All @@ -35,18 +35,6 @@ jobs:
matrix:
os: [ubuntu-latest]
php: ['7.4', '8.0']
env:
# WARNING!
# These variables are provided for testing use only. NEVER use them for other purposes!
YII2_OAUTH2_SERVER_PRIVATE_KEY_PASSPHRASE: secret
YII2_OAUTH2_SERVER_CODES_ENCRYPTION_KEY: def00000761b6fce5b2c1721c37602e82effb785154c3bb0db93bfb3f413012bd85d46461e28f156a3a5afab910a64d5b2665276d45f24b1085d90e12ab3d38ee47b4337
YII2_OAUTH2_SERVER_STORAGE_ENCRYPTION_KEY: def00000cb36fd6ed6641e0ad70805b28da86192765eb73daae7306acc537ca5e9678db80e92dbfcb489debbac0ed96139e6ff210fc0281078e99c1420d2d18e2c7388ac
MYSQL_HOST: localhost
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
MYSQL_DB_NAME: Yii2Oauth2ServerTest
MYSQL_USER_NAME: Yii2Oauth2ServerTest
MYSQL_USER_PASSWORD: password

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -82,6 +70,17 @@ jobs:

- name: Codeception tests
run: php vendor/bin/codecept run --steps --colors --debug
env:
# WARNING!
# These variables are provided for testing use only. NEVER use them for other purposes!
YII2_OAUTH2_SERVER_PRIVATE_KEY_PASSPHRASE: secret
YII2_OAUTH2_SERVER_CODES_ENCRYPTION_KEY: def00000761b6fce5b2c1721c37602e82effb785154c3bb0db93bfb3f413012bd85d46461e28f156a3a5afab910a64d5b2665276d45f24b1085d90e12ab3d38ee47b4337
YII2_OAUTH2_SERVER_STORAGE_ENCRYPTION_KEY: def00000cb36fd6ed6641e0ad70805b28da86192765eb73daae7306acc537ca5e9678db80e92dbfcb489debbac0ed96139e6ff210fc0281078e99c1420d2d18e2c7388ac
MYSQL_HOST: localhost
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
MYSQL_DB_NAME: Yii2Oauth2ServerTest
MYSQL_USER_NAME: Yii2Oauth2ServerTest
MYSQL_USER_PASSWORD: password

- name: Code coverage
run: |
Expand Down

0 comments on commit 8788ef0

Please sign in to comment.