From 38fa7c39bc7b0070828df25f5a56b086bad12029 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Fri, 2 Aug 2024 20:59:38 -0400 Subject: [PATCH] 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. --- .github/workflows/build-and-test.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index dc74666..7683c3c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 }}