Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add action precedence #9

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Windows Build

on:
pull_request:
workflow_run:
workflows: ["Tests"]
types:
- completed
branches: [main]
workflow_dispatch:

jobs:
build-windows:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Run MyPy
run: mypy src

- name: Check dependencies for known vulnerabilities
run: |
safety check
# - name: Check dependencies for known vulnerabilities
# run: |
# safety check
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Release

on:
push:
branches:
- main
workflow_run:
workflows: ["Unix Build", "Windows Build"]
types:
- completed
branches: [main]

jobs:
release:
if: |
github.event.workflow_run.conclusion == 'success' &&
!contains(github.event.workflow_run.head_branch, 'dependabot/')
name: Create Release
runs-on: ubuntu-latest
steps:
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
name: Tests

on:
pull_request:
branches: [main]
push:
branches:
- "**" # Run on all branches
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
Expand All @@ -29,5 +24,7 @@ jobs:
pip install -e ".[dev]"

- name: Run tests
run: |
pytest --cov=src/pdf_converter --cov-report=xml
run: pytest tests/

# - name: Check dependencies for known vulnerabilities
# run: safety check
9 changes: 6 additions & 3 deletions .github/workflows/unix-build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Linux and macOS Build
name: Unix Build

on:
pull_request:
workflow_run:
workflows: ["Tests"]
types:
- completed
branches: [main]
workflow_dispatch:

jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build for ${{ matrix.platform }}-${{ matrix.arch }}
strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PDF to Markdown Converter

[![Code Quality](https://github.com/ai-mindset/py-cross-compile/actions/workflows/code-quality.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/code-quality.yml)
[![Linux and macOS Build](https://github.com/ai-mindset/py-cross-compile/actions/workflows/unix-build.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/unix-build.yml)
[![Unix Build](https://github.com/ai-mindset/py-cross-compile/actions/workflows/unix-build.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/unix-build.yml)
[![Windows Build](https://github.com/ai-mindset/py-cross-compile/actions/workflows/build-win.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/build-win.yml)
[![Tests](https://github.com/ai-mindset/py-cross-compile/actions/workflows/tests.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/tests.yml)
<!-- Placeholder for release badge -->
[![Release](https://github.com/ai-mindset/py-cross-compile/actions/workflows/release.yml/badge.svg)](https://github.com/ai-mindset/py-cross-compile/actions/workflows/release.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)


Expand Down