-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1017 Bytes
/
sandbox.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: shell-test
on:
push:
branches:
- shell-escape-space
workflow_dispatch:
# allow manual runs on branches without a PR
jobs:
shell-test:
name: shell test on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/setup-python@v4
- name: setup environment
shell: bash
id: setup
run: |
set -euxo pipefail
python -m venv 'venv A'
if [ -d 'venv A/bin']; then
echo "python=$(pwd)/venv A/bin/python" >> "$GITHUB_OUTPUT"
else
echo "python=$(pwd)/venv A/Scripts/python.exe" >> "$GITHUB_OUTPUT"
fi
mkdir 'test A'
echo "print(__file__)" >> 'test A/test.py'
echo "test=$(pwd)/test A/test.py" >> "$GITHUB_OUTPUT"
- name: works with shell
shell: bash
run: "${{ steps.setup.outputs.python }}" "${{ steps.setup.outputs.test }}"