Skip to content

Commit

Permalink
chore: Update build and test workflow
Browse files Browse the repository at this point in the history
- Cache pip installed packages
- Install the poetry-dynamic-versioning plugin
  • Loading branch information
cmlccie committed Aug 3, 2024
1 parent 25e9da3 commit eeaf9e3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,33 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- uses: Gr1N/setup-poetry@v9

- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Install Dependencies
run: poetry install --no-root --only=dev
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install --no-root --only=dev
- name: Get Webex Token
id: webex_token
run: |
WEBEX_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token)
echo "WEBEX_ACCESS_TOKEN=$WEBEX_ACCESS_TOKEN" >> "$GITHUB_OUTPUT"
echo "::add-mask::$WEBEX_ACCESS_TOKEN"
- name: Build
run: poetry build

- name: Install
run: pip install dist/*.whl

- name: Test
run: pytest -s -m "not slow and not manual"
env:
Expand All @@ -46,6 +56,7 @@ jobs:
WEBEX_TEST_FILE_URL: ${{ vars.WEBEX_TEST_FILE_URL }}
WEBEX_GUEST_ISSUER_ID: ${{ secrets.WEBEX_GUEST_ISSUER_ID }}
WEBEX_GUEST_ISSUER_SECRET: ${{ secrets.WEBEX_GUEST_ISSUER_SECRET }}

- name: Upload Distribution Files
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit eeaf9e3

Please sign in to comment.