Skip to content

CI

CI #996

Workflow file for this run

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.arch.name }} - ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
strategy:
fail-fast: false
matrix:
os:
- name: Linux
emoji: 🐧
runs-on:
intel: ubuntu-latest
matrix: linux
- name: Windows
emoji: 🪟
runs-on:
intel: windows-latest
matrix: windows
- name: macOS
emoji: 🍎
runs-on:
arm: macos-latest
intel: macos-12
matrix: macos
arch:
- name: ARM
matrix: arm
- name: Intel
matrix: intel
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: CPython 3.11
action: '3.11'
- name: CPython 3.12
action: '3.12'
- name: PyPy 2.7
action: pypy-2.7
- name: PyPy 3.9
action: pypy-3.9
- name: PyPy 3.10
action: pypy-3.10
exclude:
- os:
matrix: linux
arch:
matrix: arm
- os:
matrix: windows
arch:
matrix: arm
- os:
matrix: macos
arch:
matrix: arm
python:
action: '3.7'
- os:
matrix: macos
arch:
matrix: arm
python:
action: 'pypy-3.7'
- os:
matrix: windows
python:
action: 'pypy-2.7'
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