fix: use github output and set id to use in other steps #55
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.x | |
tools: composer:v2 | |
- name: Install dependencies | |
run: npm install | |
- run: xvfb-run -a npm test | |
if: runner.os == 'Linux' | |
- run: npm test | |
if: runner.os != 'Linux' | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: test-results | |
path: test-results.xml | |
- name: Publish Unit Test Results (Linux) | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() && runner.os == 'Linux' | |
with: | |
check_name: Test Results ${{ runner.os }} | |
files: test-results.xml | |
- name: Publish Unit Test Results (Windows & Mac) | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: always() && runner.os != 'Linux' | |
with: | |
check_name: Test Results ${{ runner.os }} | |
files: test-results.xml |