-
Notifications
You must be signed in to change notification settings - Fork 4
80 lines (62 loc) · 1.61 KB
/
main.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
74
75
76
77
78
79
80
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
create:
tags:
- '*'
defaults:
run:
shell: bash -l {0}
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python_version: [3.8]
robot_version: [3, 4]
steps:
- uses: actions/checkout@v2
- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge
- name: Create the conda environment
run: mamba install -q python=${{ matrix.python_version }} pip lunr flake8 pytest
- name: Install robotframework
run: mamba install -q robotframework=${{ matrix.robot_version }}
- name: Install library
run: pip install .
- name: Flake8
run: python -m flake8 robotframework_interpreter setup.py --ignore=E501,W504,W503
- name: Tests
run: pytest tests
publish-wheels:
runs-on: ubuntu-latest
needs: [tests]
if: ${{ github.event_name == 'create' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel build
- name: Build wheel
run: python -m build
- name: Publish wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*