From a8cc3de6fc27aa45de4355d0907c7ffb9842c601 Mon Sep 17 00:00:00 2001 From: glados Date: Mon, 13 Jan 2025 14:21:29 +0100 Subject: [PATCH] Update --- .github/workflows/install-pkg.yml | 42 +++++++++++++++++++++++-------- .github/workflows/quality.yml | 17 ------------- .github/workflows/test.yml | 40 ----------------------------- 3 files changed, 32 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/quality.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/install-pkg.yml b/.github/workflows/install-pkg.yml index a1ba0b8..088d922 100644 --- a/.github/workflows/install-pkg.yml +++ b/.github/workflows/install-pkg.yml @@ -3,7 +3,34 @@ name: Test Package Installation on: [push, pull_request] jobs: - build-and-test: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Poetry + uses: abatilo/actions-poetry@v3 + with: + poetry-version: 1.8.5 + + - name: Build package + run: | + poetry build + + - name: Upload dist artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + retention-days: 1 + + test-install: + needs: build strategy: fail-fast: false matrix: @@ -13,21 +40,16 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install Poetry - uses: abatilo/actions-poetry@v3 + - name: Download built package + uses: actions/download-artifact@v4 with: - poetry-version: 1.8.5 - - - name: Build package - run: | - poetry build + name: dist + path: dist/ - name: Test wheel installation run: | diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml deleted file mode 100644 index 2dd5116..0000000 --- a/.github/workflows/quality.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Quality Checks - -on: [push, pull_request] - -jobs: - quality: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Run pre-commit - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 204afcc..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Run Tests - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Cache conda - uses: actions/cache@v4 - env: - CACHE_NUMBER: 0 # Increase this value to reset cache if environment.yml has not changed - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} - - - name: Setup Conda - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - environment-file: environment.yml - - - name: Install Poetry - uses: abatilo/actions-poetry@v3 - with: - poetry-version: 1.8.5 - - - name: Install dependencies - shell: bash -l {0} - run: | - poetry env info - poetry install - pip list - - - name: Run tests - shell: bash -l {0} - run: | - poetry run pytest -s