-
Notifications
You must be signed in to change notification settings - Fork 22
51 lines (51 loc) · 1.45 KB
/
ci.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
name: Continuous Integration
on:
workflow_call:
inputs:
python-version:
description: 'Python version'
required: true
type: string
poetry-version:
description: 'Poetry version'
required: true
type: string
os:
description: 'OS'
required: true
type: string
environment:
description: 'Environment'
required: true
type: string
jobs:
build:
runs-on: ${{ inputs.os }}
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ inputs.poetry-version }}
- name: install
run: poetry install
- name: build
run: poetry build
- name: lint
run: poetry run pylint terminalgpt tests
- name: version
run: poetry run terminalgpt --version
- name: test
env:
OPENAI_API_KEY: mock-key-123-456-789
run: poetry run pytest -v --disable-warnings --cov=terminalgpt tests/unit tests/integration
# - name: Build and publish to pypi
# uses: JRubics/[email protected]
# with:
# pypi_token: ${{ secrets.PYPI_TOKEN }}
# repository_name: "testpypi"
# repository_url: "https://test.pypi.org/legacy/"