Skip to content

Commit

Permalink
Add github context to set N98_MAGERUN2_TEST_MAGENTO_ROOT variable
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuench committed Feb 14, 2021
1 parent 6a12ccf commit 979260b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,21 @@ jobs:
- 3306
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping"
env:
N98_MAGERUN2_TEST_MAGENTO_ROOT: ${{ env.GITHUB_WORKSPACE }}/magento
MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}
MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- name: Set env
run: echo ::set-env name=workspace::$GITHUB_WORKSPACE

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(env) }}
run: echo "$GITHUB_CONTEXT"

# https://github.com/marketplace/actions/setup-php-action#matrix-setup
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -93,11 +100,15 @@ jobs:
uses: mheap/phpunit-matcher-action@master

- name: Run PHPUnit (Developer Mode)
env:
N98_MAGERUN2_TEST_MAGENTO_ROOT: ${{ env.workspace }}/magento
run: vendor/bin/phpunit --process-isolation --teamcity

- name: Activate Magento Production Mode
working-directory: ./magento
run: bin/magento deploy:mode:set --skip-compilation production

- name: Run PHPUnit (Production Mode)
env:
N98_MAGERUN2_TEST_MAGENTO_ROOT: ${{ env.workspace }}/magento
run: vendor/bin/phpunit --process-isolation --teamcity

0 comments on commit 979260b

Please sign in to comment.