CI #863
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: CI | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- "*" | |
pull_request: | |
branches: [ main ] | |
schedule: | |
# Daily at 04:52 | |
- cron: '52 4 * * *' | |
env: | |
A_SECRET: neverseethis | |
jobs: | |
ci: | |
name: ${{ matrix.os.emoji }} - ${{ matrix.python.name }} | |
runs-on: ${{ matrix.os.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: Linux | |
emoji: 🐧 | |
runs-on: ubuntu-latest | |
- name: Windows | |
emoji: 🪟 | |
runs-on: windows-latest | |
- name: macOS | |
emoji: 🍎 | |
runs-on: macos-latest | |
python: | |
- name: CPython 3.7 | |
action: '3.7' | |
- name: CPython 3.8 | |
action: '3.8' | |
- name: CPython 3.9 | |
action: '3.9' | |
- name: CPython 3.10 | |
action: '3.10' | |
- name: PyPy 2.7 | |
action: pypy-2.7 | |
- name: PyPy 3.7 | |
action: pypy-3.7 | |
- name: PyPy 3.8 | |
action: pypy-3.8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up ${{ matrix.python.name }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python.action }} | |
- name: Run the action | |
uses: ./ | |
env: | |
A_SECRET: '<masked>' | |
with: | |
output-path: output_pre.log | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os.name }} - ${{ matrix.python.name }} | |
path: output_pre.log | |
- name: Test - pre | |
shell: bash | |
run: | | |
python test.py --path output_pre.log | |
- name: Install attrs | |
shell: bash | |
run: | | |
python -m pip install attrs==20.3.0 | |
- name: Run the action with attrs installed | |
uses: ./ | |
env: | |
A_SECRET: '<masked>' | |
with: | |
output-path: output_post.log | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os.name }} - ${{ matrix.python.name }} | |
path: output_post.log | |
- name: Test - post | |
shell: bash | |
run: | | |
python test.py --path output_post.log --package attrs 20.3.0 | |
- name: Create env and install requests | |
shell: bash | |
run: | | |
python -m pip install virtualenv | |
python -m virtualenv -p python an_env | |
an_env/*/python -m pip install six==1.15.0 | |
- name: Run the action for the env | |
uses: ./ | |
env: | |
A_SECRET: '<masked>' | |
with: | |
output-path: output_env.log | |
python-path: an_env/*/python | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os.name }} - ${{ matrix.python.name }} | |
path: output_env.log | |
- name: Test - env | |
shell: bash | |
run: | | |
python test.py --path output_env.log --package six 1.15.0 --sys-prefix "$(an_env/*/python -c 'import sys; sys.stdout.write(sys.prefix)')" | |
- name: Create tox env with build installed | |
shell: bash | |
run: | | |
python -m pip install tox | |
python -m tox -c tox_example.ini --notest -e with_build | |
- name: Run the action for the tox env | |
uses: ./ | |
env: | |
A_SECRET: '<masked>' | |
with: | |
output-path: output_tox.log | |
python-path: .tox/with_build/*/python | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os.name }} - ${{ matrix.python.name }} | |
path: output_tox.log | |
- name: Test - tox | |
shell: bash | |
run: | | |
python test.py --path output_tox.log --package build 0.3.1 --sys-prefix "$(.tox/with_build/*/python -c 'import sys; sys.stdout.write(sys.prefix)')" | |
all: | |
name: All | |
runs-on: ubuntu-latest | |
needs: | |
- ci | |
steps: | |
- name: This | |
shell: python | |
run: | | |
import this |