-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (53 loc) · 1.76 KB
/
test-workflow-integration-using-poetry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test workflow integration using Poetry
on:
push:
branches: [main, issue-*]
pull_request:
branches: [main, issue-*]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.9"
- name: Setup Libvips
run: |
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y libvips-dev
- name: Setup Poetry
run: pip3 install poetry poetry-dynamic-versioning wheel
- name: Check Poetry
run: poetry --version
- name: Config Poetry for Cache
if: ${{ !env.ACT }}
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
if: ${{ !env.ACT }}
uses: actions/[email protected]
with:
path: ./.venv
key: ${{ runner.os }}-venv-v0-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
- name: Install via Poetry
run: |
poetry install
poetry build
pip install --user "${{ github.workspace }}/dist/nautilus_librarian-$(poetry version --short)-py3-none-any.whl"
- name: Invoke Librarian
run: nautilus-librarian --version
- name: Install via Poetry (dev env)
if: ${{ env.ACT }}
run: |
poetry install
poetry build
ls "${{ github.workspace }}/dist/"
pip install --user "${{ github.workspace }}/dist/nautilus_librarian-$(poetry version --short)-py3-none-any.whl"
ls /root/.local/bin
- name: Invoke Librarian (dev env)
if: ${{ env.ACT }}
run: |
/root/.local/bin/nautilus-librarian --version