Skip to content

Commit b8a6975

Browse files
author
Adrian Chang
committed
filter
1 parent 1a504d4 commit b8a6975

File tree

4 files changed

+76
-6
lines changed

4 files changed

+76
-6
lines changed

.github/workflows/lbox-develop.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: LBox Develop
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
id-token: write
15+
16+
jobs:
17+
path-filter:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
lbox-example: ${{ steps.filter.outputs.lbox-example }}
21+
steps:
22+
- uses: dorny/paths-filter@v3
23+
id: filter
24+
with:
25+
list-files: 'json'
26+
filters: |
27+
lbox-example:
28+
- 'libs/lbox-example/**'
29+
build:
30+
needs: ['path-filter']
31+
if: ${{ needs.path-filter.outputs.lbox-example == 'true' }}
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
- python-version: 3.8
38+
api-key: STAGING_LABELBOX_API_KEY_2
39+
da-test-key: DA_GCP_LABELBOX_API_KEY
40+
- python-version: 3.9
41+
api-key: STAGING_LABELBOX_API_KEY_3
42+
da-test-key: DA_GCP_LABELBOX_API_KEY
43+
- python-version: "3.10"
44+
api-key: STAGING_LABELBOX_API_KEY_4
45+
da-test-key: DA_GCP_LABELBOX_API_KEY
46+
- python-version: 3.11
47+
api-key: STAGING_LABELBOX_API_KEY
48+
da-test-key: DA_GCP_LABELBOX_API_KEY
49+
- python-version: 3.12
50+
api-key: STAGING_LABELBOX_API_KEY_5
51+
da-test-key: DA_GCP_LABELBOX_API_KEY
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
56+
ref: ${{ github.head_ref }}
57+
- uses: ./.github/actions/python-package-shared-setup
58+
with:
59+
rye-version: ${{ vars.RYE_VERSION }}
60+
python-version: ${{ matrix.python-version }}
61+
- name: Format
62+
run: rye format --check -v -p lbox-example
63+
- name: Linting
64+
run: rye lint -v -p lbox-example
65+
- name: Unit
66+
working-directory: libs/lbox-example
67+
run: rye run unit
68+
- name: Integration
69+
working-directory: libs/lbox-example
70+
run: rye run integration --pyproject libs/lbox-example/pyproject.toml

.github/workflows/python-package-develop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ permissions:
1616
jobs:
1717
path-filter:
1818
runs-on: ubuntu-latest
19+
outputs:
20+
labelbox: ${{ steps.filter.outputs.labelbox }}
1921
steps:
2022
- uses: dorny/paths-filter@v3
2123
id: filter
2224
with:
2325
filters: |
2426
labelbox:
2527
- 'libs/labelbox/**'
26-
- name: Stop if no changes
27-
if: steps.filter.outputs.labelbox != 'true'
28-
run: exit 1
2928
build:
3029
needs: ['path-filter']
30+
if: ${{ needs.path-filter.outputs.labelbox == 'true' }}
3131
strategy:
3232
fail-fast: false
3333
matrix:

libs/lbox-example/src/lbox/example/art.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def coffee(amount: int = 1) -> str:
1212
str: The ASCII art representation of the coffee cups.
1313
"""
1414
ascii_art = art("coffee", number=amount)
15-
return ascii_art
15+
return ascii_art
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from lbox.example.art import coffee
22

3-
class TestArt:
43

4+
class TestArt:
55
def test_logo(self):
66
result = coffee()
7-
assert result == "c[_]"
7+
assert result == "c[_]"

0 commit comments

Comments
 (0)