Test on MacOS Homebrew #84
Workflow file for this run
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: kubernator | |
on: | |
pull_request: | |
branches: | |
- master | |
- develop | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
packages: write | |
contents: read | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
python-version: | |
- '3.12' | |
- '3.11' | |
- '3.10' | |
- '3.9' | |
env: | |
DEPLOY_PYTHONS: "3.11" | |
DEPLOY_OSES: "Linux" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
steps: | |
- name: Install Docker on MacOS | |
if: | | |
runner.os == 'macOS' | |
shell: bash | |
run: | | |
set -x | |
brew update | |
brew install docker | |
colima start | |
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock | |
while ! docker info > /dev/null 2>&1; do sleep 1 ; done | |
- name: Should Upload | |
if: | | |
github.event_name == 'push' && | |
contains(env.DEPLOY_OSES, runner.os) && | |
contains(env.DEPLOY_PYTHONS, matrix.python-version) | |
shell: bash | |
run: echo "PYB_EXTRA_ARGS=+upload" >> "$GITHUB_ENV" | |
- name: Login to GitHub Container Registry for Upload | |
if: | | |
github.event_name == 'push' && | |
contains(env.DEPLOY_OSES, runner.os) && | |
contains(env.DEPLOY_PYTHONS, matrix.python-version) | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with PyBuilder | |
uses: pybuilder/build@master | |
with: | |
homebrew-python: true | |
python-version: ${{ matrix.python-version }} | |
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }} | |
build-summary: | |
if: success() || failure() | |
runs-on: ubuntu-latest | |
name: Build Stable Summary | |
needs: build | |
steps: | |
- name: Check build matrix status | |
if: needs.build.result != 'success' | |
run: exit 1 |