Skip to content

Commit

Permalink
workflow edits (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjlane authored Nov 1, 2024
1 parent b5da4e3 commit 5fc5d07
Showing 1 changed file with 53 additions and 16 deletions.
69 changes: 53 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,68 @@
name: deploy

on:
workflow_run:
branches:
- main
workflows:
- "tests"
- "mypy"
- "ruff"
types:
- completed
push:
tags:
- '*'

jobs:

validate:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
platform:
- ubuntu-latest
- macos-latest
- windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Lint with Ruff
run: |
pip install ruff
ruff check --output-format=github .
- name: mypy
run: |
pip install mypy
pip install '.[tests]'
mkdir .mypy_cache
mypy --install-types --non-interactive meteor/ test/
- name: Test with pytest
run: |
pip install '.[tests]'
pytest test/
deploy:
name: deploy-to-pypi
runs-on: ubuntu-latest
# only run if previous workflows were a success
# AND the commit starts with v (meaning it's a tag)
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_commit.message, 'v') }}
name: deploy
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v4

- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: "3.11"

- name: install
run: |
Expand Down

0 comments on commit 5fc5d07

Please sign in to comment.