From f9a0e37f64ce6e08a33efe4b83a5f9fe3c316199 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 3 Jun 2024 14:55:12 -0700 Subject: [PATCH] Python Poetry and GH actions --- .github/workflows/poetry-install-deps.yml | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/poetry-install-deps.yml diff --git a/.github/workflows/poetry-install-deps.yml b/.github/workflows/poetry-install-deps.yml new file mode 100644 index 0000000..ee972e3 --- /dev/null +++ b/.github/workflows/poetry-install-deps.yml @@ -0,0 +1,42 @@ +--- +name: Python Poetry +on: + - push +jobs: + poetry-deps: + + strategy: + matrix: + python-version: ["3.12"] + platform: ["ubuntu-22.04"] + # python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + # platform: ["windows-2022", "macos-13", "ubuntu-22.04"] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + # Poetry needs to be installed outside of the 'venv' + # There are various ways to do this, this is one of the easier ways. + - name: Install poetry + run: | + pipx install poetry + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'poetry' + + # Install dependencies, but do not 'python' install this repository itself + - name: Install dependencies + run: | + poetry install --no-root + + - name: Display Python version + run: python3 --version + + - name: Display installed packages + run: poetry run pip list +