Skip to content

Commit

Permalink
ci: add python apps workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-bee committed Oct 30, 2024
1 parent 4cab57a commit 007b004
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-python-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ on:
jobs:
build-python-apps:
runs-on: ubuntu-latest

defaults:
run:
working-directory: yaku-apps-python

steps:
- uses: actions/checkout@v4

- name: Setup Pants
uses: pantsbuild/actions/init-pants@v8
with:
#pants-ci-config: yaku-apps-python/pants.ci.toml
#pants-ci-config: /pants.ci.toml
cache-lmdb-store: true
gha-cache-key: unittest-cache0
named-caches-hash: ${{ hashFiles('yaku-apps-python/3rdparty/*.txt') }}
named-caches-hash: ${{ hashFiles('3rdparty/*.txt') }}

- name: Lint and check
run: |
Expand All @@ -23,11 +28,11 @@ jobs:

- name: Run unit tests
run: |
for APP in yaku-apps-python/apps/*; do
for APP in apps/*; do
make testcov FOLDER=${APP}
cp dist/coverage/python/coverage.json ${APP}/coverage.json
done
for PACKAGE in yaku-apps-python/packages/*; do
for PACKAGE in packages/*; do
make testcov FOLDER=${PACKAGE}
cp dist/coverage/python/coverage.json ${PACKAGE}/coverage.json
done
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pants.toml → yaku-apps-python/pants.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[GLOBAL]
pants_version = "2.20.0"
colors = true
pythonpath = ["%(buildroot)s/yaku-apps-python/pants-plugins"]
pythonpath = ["%(buildroot)s/pants-plugins"]
backend_packages = [
"pants.backend.build_files.fmt.ruff",
"pants.backend.experimental.python.lint.ruff.check",
Expand All @@ -19,7 +19,7 @@ pants_ignore.add = ["!papsr_playground/**"]
enabled = false

[bandit]
args = ['--ini', '%(buildroot)s/yaku-apps-python/.bandit']
args = ['--ini', '%(buildroot)s/.bandit']

[test]
timeout_default = 600
Expand Down

0 comments on commit 007b004

Please sign in to comment.