From a9c7a512b2f54a572ea8b9ad1cd6bdf77f9989d2 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 | 41 +++++++++++++++++++++++ 1 file changed, 41 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..8106cb1 --- /dev/null +++ b/.github/workflows/poetry-install-deps.yml @@ -0,0 +1,41 @@ +--- +name: Python Poetry +on: + - push + - pull_request + +jobs: + poetry-deps: + strategy: + matrix: + python-version: ["3.12"] + platform: ["ubuntu-24.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: poetry run python3 --version + + - name: Display installed packages + run: poetry run pip list +