-
Notifications
You must be signed in to change notification settings - Fork 17
57 lines (54 loc) · 1.84 KB
/
main-push.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
POETRY_VERSION: "1.8.3"
POETRY_URL: https://install.python-poetry.org
jobs:
linter_tester:
strategy:
fail-fast: false
matrix:
python-version: [3.11]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
LLM_MODEL_NAME: ${{ secrets.LLM_MODEL_NAME }}
LLM_MODEL_API_KEY: ${{ secrets.LLM_MODEL_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
id: setup_python
# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-local-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Install Poetry ${{ env.POETRY_VERSION }}
run: |
curl -sSL ${{ env.POETRY_URL }} | python - --version ${{ env.POETRY_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install project
run: make install-extra
- name: Run linter
run: make lint
# - name: Run tests
# run: make test
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}