This repository was archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
85 lines (72 loc) · 2.3 KB
/
main.yml
File metadata and controls
85 lines (72 loc) · 2.3 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash -l {0}
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: test
mamba-version: "*"
channels: conda-forge
- name: Conda install dependencies
run: |
conda env update --file ci/environment.yml --name test
- name: Lint check
run: |
make clean
make lint
make typing
- name: Test check
env:
XYZ_TOKEN: ${{ secrets.XYZ_TOKEN }}
LS_API_KEY: ${{ secrets.LS_API_KEY }}
HERE_USER_ID: ${{ secrets.HERE_USER_ID }}
HERE_CLIENT_ID: ${{ secrets.HERE_CLIENT_ID }}
HERE_ACCESS_KEY_ID: ${{ secrets.HERE_ACCESS_KEY_ID }}
HERE_ACCESS_KEY_SECRET: ${{ secrets.HERE_ACCESS_KEY_SECRET }}
HERE_TOKEN_ENDPOINT_URL: ${{ secrets.HERE_TOKEN_ENDPOINT_URL }}
run: |
pytest -v --durations=10 --cov-report=xml --cov=here_location_services tests
- name: Upload coverage to Codecov
if: github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
verbose: true
- name: Build Docs (Only on Linux for saving time)
if: matrix.os == 'ubuntu-latest'
env:
XYZ_TOKEN: ${{ secrets.XYZ_TOKEN }}
LS_API_KEY: ${{ secrets.LS_API_KEY }}
HERE_USER_ID: ${{ secrets.HERE_USER_ID }}
HERE_CLIENT_ID: ${{ secrets.HERE_CLIENT_ID }}
HERE_ACCESS_KEY_ID: ${{ secrets.HERE_ACCESS_KEY_ID }}
HERE_ACCESS_KEY_SECRET: ${{ secrets.HERE_ACCESS_KEY_SECRET }}
HERE_TOKEN_ENDPOINT_URL: ${{ secrets.HERE_TOKEN_ENDPOINT_URL }}
run: |
sh scripts/build_docs.sh
- name: Install here-location-services
run: pip install .
- name: Build the package (Only on Linux for saving time)
if: matrix.os == 'ubuntu-latest'
run: |
python setup.py sdist bdist_wheel