From 47794fb3c21f14b22e8be8b843c4f180679b38f0 Mon Sep 17 00:00:00 2001 From: Anna Rodrigues Date: Sat, 16 Dec 2023 00:05:49 -0500 Subject: [PATCH] Inverted build order --- .github/workflows/test-build.yml | 38 ++++++++++++++------------------ 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 3697b77..fb9149c 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -10,14 +10,13 @@ permissions: contents: read jobs: - test: + build: strategy: matrix: os: [ windows-latest, ubuntu-latest ] runs-on: ${{ matrix.os }} - # TODO: Add cache support steps: - uses: actions/checkout@v3 - name: Set up Python 3.11 @@ -25,22 +24,28 @@ jobs: with: python-version: "3.11" - name: Setup environment + shell: bash run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install libcairo-dev libgirepository1.0-dev + fi python -m pip install packaging pipenv psutil python setup.py setup -# - name: Get pip cache dir -# id: pipenv-cache -# run: | -# echo "dir=$(pipenv --venv)" >> $GITHUB_OUTPUT - - name: Run tests - run: python setup.py test - build: + - name: Build + run: python setup.py build + - name: Upload files + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }} dist files + path: dist/discord.fm-* + test: strategy: matrix: os: [ windows-latest, ubuntu-latest ] runs-on: ${{ matrix.os }} + # TODO: Add cache support steps: - uses: actions/checkout@v3 - name: Set up Python 3.11 @@ -51,18 +56,9 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt install libgirepository1.0-dev + sudo apt-get install libcairo-dev libgirepository1.0-dev fi python -m pip install packaging pipenv psutil python setup.py setup -# - name: Get pip cache dir -# id: pipenv-cache -# run: | -# echo "dir=$(pipenv --venv)" >> $GITHUB_OUTPUT - - name: Build - run: python setup.py build - - name: Upload files - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.os }} dist files - path: dist/discord.fm-* + - name: Run tests + run: python setup.py test