Skip to content

Commit

Permalink
Introduce Action to run install_requirement.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed May 29, 2024
1 parent 75047ff commit 5b6e556
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,74 @@ jobs:
repo: toga
build-subdir: android

test-install-requirements:
name: Install Requirements
needs: pre-commit
runs-on: ${{ matrix.runner-os }}
strategy:
fail-fast: false
matrix:
runner-os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- name: Checkout beeware/briefcase
uses: actions/[email protected]
with:
repository: beeware/briefcase

- name: Checkout beeware/briefcase to path
uses: actions/[email protected]
with:
repository: beeware/briefcase
path: repos/briefcase

- name: Checkout beeware/.github
uses: actions/[email protected]
with:
repository: beeware/.github
path: repos/.github-beeware

- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.x"

- name: Test Install Requirements with Path
uses: ./repos/.github-beeware/.github/actions/install-requirement
with:
requirements: "pre-commit tox"
extra: "dev"
project-root: "repos/briefcase"

- name: Test Install Requirements with Extra
uses: ./repos/.github-beeware/.github/actions/install-requirement
with:
requirements: "coverage"
extra: "dev"

- name: Test Install Requirements
uses: ./repos/.github-beeware/.github/actions/install-requirement
with:
requirements: "cookiecutter"

- name: Verify Requirements Installed
run: |
if ! python -m pip list | grep tox; then
echo '::error::Failed to install tox'
exit 1
fi
if ! python -m pip list | grep pre-commit; then
echo '::error::Failed to install pre-commit'
exit 1
fi
if ! python -m pip list | grep coverage; then
echo '::error::Failed to install coverage'
exit 1
fi
if ! python -m pip list | grep cookiecutter; then
echo '::error::Failed to install cookiecutter'
exit 1
fi
test-verify-projects-briefcase:
name: Verify Project
needs: [ pre-commit, test-package-python ]
Expand Down
Binary file not shown.

0 comments on commit 5b6e556

Please sign in to comment.