-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.61 KB
/
build.yaml
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
66
67
68
---
name: Build Package
env:
GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }}
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Setup SSH Agent
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.GIT_SSH_KEY }}
#
# - name: Clone Required Repos
# run: git clone [email protected]:TetraVeda/kaslcred.git
- name: Resolve Version
run: |
IMAGE_VERSION=$(git describe --tags --abbrev=0)
echo "IMAGE_VERSION=$IMAGE_VERSION" >> $GITHUB_ENV
echo "building version $IMAGE_VERSION"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Cache pipenv dependencies
uses: actions/cache@v3
with:
path: |
~/.local/share/virtualenvs
~/.cache/pipenv
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Install pipenv
run: |
python -m pip install pipenv
- name: Install dependencies
run: |
PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy --ignore-pipfile --dev
- name: Run tests
run: pipenv run python -m pytest
- name: Build
run: pipenv run python -m build
- name: Archive package artifacts
uses: actions/upload-artifact@v3
with:
name: python-package
path: dist/*