Skip to content

Commit

Permalink
chore: Update build and test workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmlccie committed Aug 3, 2024
1 parent 1a0a17e commit 38fa7c3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ jobs:
name: Build and Test
runs-on: ubuntu-latest
environment: chris-1xrn.wbx.ai
env:
POETRY_VIRTUALENVS_CREATE: false
steps:
- uses: Gr1N/setup-poetry@v9
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install Dependencies
run: pip install -r requirements.txt
run: 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 and Test
run: script/ci
- name: Build
run: poetry build
- name: Install
run: pip install dist/*.whl
- name: Test
run: pytest -s -m "not slow and not manual"
env:
WEBEX_ACCESS_TOKEN: ${{ steps.webex_token.outputs.WEBEX_ACCESS_TOKEN }}
WEBEX_TEST_DOMAIN: ${{ vars.WEBEX_TEST_DOMAIN }}
Expand Down

0 comments on commit 38fa7c3

Please sign in to comment.