Skip to content

upgrade pre-commit, pytest, & pytest plugins #2750

upgrade pre-commit, pytest, & pytest plugins

upgrade pre-commit, pytest, & pytest plugins #2750

name: Pyinstaller (on_push)
on:
push:
paths:
- .github/scripts/cicd/build_pyinstaller.sh
- .github/workflows/on-push-pyinstaller.yml
- runway/*
- poetry.lock
- pyproject.toml
- runway.file.spec
- runway.folder.spec
env:
AWS_DEFAULT_REGION: us-east-1
jobs:
build-pyinstaller-onefile:
name: Pyinstaller "One File" Build
strategy:
matrix:
os: [macos-12, ubuntu-latest, windows-latest]
python-version: [3.9]
runs-on: ${{ matrix.os }}
env:
OS_NAME: ${{ matrix.os }}
# pydantic binary causes a recursion error
# https://github.com/pyinstaller/pyinstaller/issues/4406
PIP_NO_BINARY: pydantic
steps:
- name: ⤵️ Check out code from GitHub (complete)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🏗 Setup Python
uses: finleyfamily/[email protected]
with:
poetry-install: false
poetry-plugins: poetry-dynamic-versioning
python-version: ${{ matrix.python-version }}
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos (ubuntu)
if: startsWith( matrix.os, 'ubuntu' )
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: ⤵️ Install Dependencies (ubuntu)
if: startsWith( matrix.os, 'ubuntu' )
run: sudo apt-get update && sudo apt-get install sed -y
- name: ⤵️ Install Dependencies (windows)
if: matrix.os == 'windows-latest'
run: choco install make sed
- name: 👷 Build
run: make build-pyinstaller-file
- name: ⤴️ Upload distribution artifact
uses: actions/upload-artifact@v4
with:
name: pyinstaller-onefile-${{ matrix.os }}
path: artifacts
build-pyinstaller-onefolder:
name: Pyinstaller "One Folder" Build
strategy:
matrix:
os: [macos-12, ubuntu-latest, windows-latest]
python-version: [3.9]
runs-on: ${{ matrix.os }}
env:
OS_NAME: ${{ matrix.os }}
# pydantic binary causes a recursion error
# https://github.com/pyinstaller/pyinstaller/issues/4406
PIP_NO_BINARY: pydantic
steps:
- name: ⤵️ Check out code from GitHub (complete)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🏗 Setup Python
uses: finleyfamily/[email protected]
with:
poetry-install: false
poetry-plugins: poetry-dynamic-versioning
python-version: ${{ matrix.python-version }}
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos (ubuntu)
if: startsWith( matrix.os, 'ubuntu' )
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: ⤵️ Dependencies (ubuntu)
if: startsWith( matrix.os, 'ubuntu' )
run: sudo apt-get update && sudo apt-get install sed -y
- name: ⤵️ Install Dependencies (windows)
if: matrix.os == 'windows-latest'
run: choco install make sed
- name: 👷 Build
run: make build-pyinstaller-folder
- name: ⤴️ Upload distribution artifact
uses: actions/upload-artifact@v4
with:
name: pyinstaller-onefolder-${{ matrix.os }}
path: artifacts
build-npm:
name: Build npm 📦
if: github.ref == 'refs/heads/master'
needs:
- build-pyinstaller-onefolder
env:
NODE_VERSION: 20
NPM_PACKAGE_NAME: '@onica/runway'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9]
runs-on: ${{ matrix.os }}
steps:
- name: ⤵️ Check out code from GitHub (complete)
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: check_distance
name: 💂 Ensure Commit Is Not Tagged
continue-on-error: true
run: bash ./check_distance_from_tag.sh
working-directory: .github/scripts/cicd
- name: 🏗 Setup Python
uses: finleyfamily/[email protected]
with:
poetry-install: false
poetry-plugins: poetry-dynamic-versioning
python-version: ${{ matrix.python-version }}
- name: 🏗 Setup Node
uses: actions/setup-node@v4
if: steps.check_distance.outcome == 'success'
with:
always-auth: true
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
scope: '@onica'
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos (ubuntu)
if: startsWith( matrix.os, 'ubuntu' )
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: ⤵️ Install Dependencies (ubuntu)
if: steps.check_distance.outcome == 'success'
run: sudo apt-get update && sudo apt-get install sed tree -y
- name: ⤵️ Download distribution artifacts (macOS)
if: steps.check_distance.outcome == 'success'
uses: actions/download-artifact@v4
with:
name: pyinstaller-onefolder-macos-12
path: artifacts
- name: ⤵️ Download distribution artifacts (ubuntu)
if: steps.check_distance.outcome == 'success'
uses: actions/download-artifact@v4
with:
name: pyinstaller-onefolder-ubuntu-latest
path: artifacts
- name: ⤵️ Download distribution artifacts (windows)
if: steps.check_distance.outcome == 'success'
uses: actions/download-artifact@v4
with:
name: pyinstaller-onefolder-windows-latest
path: artifacts
- name: ℹ️ List artifacts
if: steps.check_distance.outcome == 'success'
run: tree artifacts/
- name: 👷 npm Prep
if: steps.check_distance.outcome == 'success'
run: make npm-prep
- name: 👷 Build
if: steps.check_distance.outcome == 'success'
run: |
npm pack
rm -rf artifacts && mkdir -p artifacts
find . -name 'onica-runway-*.*.*.tgz' -exec mv {} artifacts/ \;
- name: ℹ️ Skipped Publishing
if: steps.check_distance.outcome == 'failure'
run: echo "A pre-production version was not published because the current commit is tagged for release."
- name: ⤴️ Upload distribution artifacts
if: steps.check_distance.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: npm-pack
path: artifacts