Skip to content

Commit 38fa7c3

Browse files
committed
chore: Update build and test workflow
Simplify the build and test workflow by using Poetry for dependency management and building the project. Also, update the installation step to install the built distribution package.
1 parent 1a0a17e commit 38fa7c3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/build-and-test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ jobs:
1414
name: Build and Test
1515
runs-on: ubuntu-latest
1616
environment: chris-1xrn.wbx.ai
17+
env:
18+
POETRY_VIRTUALENVS_CREATE: false
1719
steps:
20+
- uses: Gr1N/setup-poetry@v9
1821
- uses: actions/checkout@v4
1922
with:
2023
fetch-depth: 0
2124
fetch-tags: true
2225
- name: Install Dependencies
23-
run: pip install -r requirements.txt
26+
run: poetry install --no-root --only=dev
2427
- name: Get Webex Token
2528
id: webex_token
2629
run: |
2730
WEBEX_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token)
2831
echo "WEBEX_ACCESS_TOKEN=$WEBEX_ACCESS_TOKEN" >> "$GITHUB_OUTPUT"
2932
echo "::add-mask::$WEBEX_ACCESS_TOKEN"
30-
- name: Build and Test
31-
run: script/ci
33+
- name: Build
34+
run: poetry build
35+
- name: Install
36+
run: pip install dist/*.whl
37+
- name: Test
38+
run: pytest -s -m "not slow and not manual"
3239
env:
3340
WEBEX_ACCESS_TOKEN: ${{ steps.webex_token.outputs.WEBEX_ACCESS_TOKEN }}
3441
WEBEX_TEST_DOMAIN: ${{ vars.WEBEX_TEST_DOMAIN }}

0 commit comments

Comments
 (0)