-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (71 loc) · 1.91 KB
/
resotoclient_test_and_publish.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
66
67
68
69
70
71
72
73
name: Test and publish (resotoclient)
on:
push:
branches:
- main
paths:
- 'resotoclient/**'
- '.github/**'
tags:
- "*.*.*"
pull_request:
paths:
- 'resotoclient/**'
- '.github/**'
jobs:
resotoclient-test-and-build:
name: "Test and build (resotoclient)"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
services:
arangodb:
image: arangodb:3.10.5
env:
ARANGO_NO_AUTH: 1
ports:
- 8529:8529
resotocore:
image: somecr.io/someengineering/resotocore:3.3.3
env:
RESOTOCORE_ANALYTICS_OPT_OUT: true
RESOTOCORE_GRAPHDB_SERVER: http://arangodb:8529
RESOTOCORE_OVERRIDE: "resotocore.api.web_hosts=0.0.0.0"
ports:
- 8900:8900
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Restore dependency cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: $\{\{runner.os}}-poetry-$\{\{hashFiles('poetry.lock')}}
restore-keys: |
$\{\{ runner.os }}-poetry-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip poetry nox nox-poetry
poetry install
- name: Dump docker logs
uses: jwalton/gh-docker-logs@v2
- name: Run nox
env:
RESOTOCORE_ANALYTICS_OPT_OUT: true
run: nox
- name: Build a binary wheel and a source tarball
run: >-
poetry build
- name: Publish distribution to PyPI
if: github.ref_type == 'tag'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_RESOTOCLIENT }}
packages_dir: ./dist/