diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0fe491b..04dcd4b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,6 +21,26 @@ jobs: pip install pytest pytest-md pytest-emoji - uses: ./. + quotes: + name: Test quotes + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.x + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + pip install pytest pytest-md pytest-emoji + - uses: ./. + with: + custom-arguments: -k "not failed" + test-micromamba: name: Run tests (setup-micromamba) strategy: diff --git a/action.yml b/action.yml index 23884bc..acf919c 100644 --- a/action.yml +++ b/action.yml @@ -39,17 +39,9 @@ runs: - name: Run pytest id: pytest run: | - echo "::group::..." REPORT="$(mktemp)" echo "report-path=$REPORT" >> $GITHUB_OUTPUT - args=() - if [ ${{ inputs.verbose }} = true ]; then args+=('-v'); fi - if [ ${{ inputs.job-summary }} = true ]; then args+=("--md=$REPORT"); fi - if [ ${{ inputs.emoji }} = true ]; then args+=('--emoji'); fi - # unpack custom arguments from spaces to array - args+=(`echo "${{ inputs.custom-arguments }}"`) - echo "::endgroup::" - ${{ inputs.custom-pytest }} "${args[@]}" + ${{ inputs.custom-pytest }}${{ inputs.verbose == 'true' && ' -v' || '' }}${{ inputs.job-summary == 'true' && ' --md=$REPORT' || '' }}${{ inputs.emoji == 'true' && ' --emoji' || '' }}${{ inputs.custom-arguments != '' && ' ' || '' }}${{ inputs.custom-arguments }} shell: bash -el {0} # use login shell to source .bashrc for environments - name: Add report to summary # run even if pytest fails