From 185a1b319d55f6dd3f45e31b0e4e1915b0b6238a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Wed, 6 Dec 2023 10:11:07 +0100 Subject: [PATCH 1/2] ci: replaced `python_version` matrix var with `python-version-file: pyproject.toml` --- .github/workflows/build.yml | 8 ++++---- .github/workflows/examples.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4b1aec..146b0c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-11] - python_version: [3.9] steps: - uses: actions/checkout@v2 @@ -22,14 +21,15 @@ jobs: submodules: 'recursive' - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python_version }} + python-version-file: pyproject.toml + cache: 'poetry' - name: Install dependencies shell: bash run: | - pip install poetry==1.3.2 + pipx install poetry==1.3.2 python -m venv venv source venv/bin/activate || source venv/Scripts/activate make build diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 1dd8fc8..e15d45d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -15,17 +15,17 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python_version: [3.9] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python_version }} + python-version-file: pyproject.toml + cache: 'poetry' - name: Create virtualenv shell: bash @@ -36,10 +36,10 @@ jobs: - name: Install dependencies shell: bash run: | - pip install poetry + pipx install poetry source venv/bin/activate || source venv/Scripts/activate make build - + - name: Set up ActivityWatch uses: ActivityWatch/setup-action@master with: From 18d257f1155c750270b437a73912d90aac1f962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Wed, 6 Dec 2023 10:23:51 +0100 Subject: [PATCH 2/2] ci: fixed poetry caching --- .github/workflows/build.yml | 3 ++- .github/workflows/examples.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 146b0c3..d27f7fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: with: submodules: 'recursive' + - run: pipx install poetry + - name: Set up Python uses: actions/setup-python@v4 with: @@ -29,7 +31,6 @@ jobs: - name: Install dependencies shell: bash run: | - pipx install poetry==1.3.2 python -m venv venv source venv/bin/activate || source venv/Scripts/activate make build diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index e15d45d..1409b74 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -21,6 +21,8 @@ jobs: with: submodules: 'recursive' + - run: pipx install poetry + - name: Set up Python uses: actions/setup-python@v4 with: @@ -36,7 +38,6 @@ jobs: - name: Install dependencies shell: bash run: | - pipx install poetry source venv/bin/activate || source venv/Scripts/activate make build