-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (55 loc) · 1.9 KB
/
CI.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
name: CI Pipeline
# Triggers of the Action: Push or Pull Request
on:
pull_request:
branches: [ develop ]
types: [opened, review_requested, ready_for_review, synchronize]
# Allows you to run this workflow manually from the Actions tab (when this yml is in the main branch)
workflow_dispatch:
jobs:
build:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
fail-fast: false # allow other OS to keep running when one fails
matrix: # Linux ; MacOS ; Windows
sys:
- { os: ubuntu-latest, shell: bash}
#- { os: windows-latest, shell: 'msys2 {0}' }
#- { os: macos-latest, shell: bash}
# Set the default shell
defaults:
run:
shell: ${{ matrix.sys.shell }}
runs-on: ${{ matrix.sys.os }}
####################################################################
steps:
# Checkout the source and the submodules
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.API_TOKEN_GITHUB }}
persist-credentials: true
# Install dependencies
- name: Install dependencies
run: pip3 install -r requirements.txt
# Set version
- name: Set Version
run: |
VERSION=$(python3 setup.py --version)
echo "__version__ = \"$VERSION\"" > maf_three/__init__.py
# Build proto files
- name: Build proto files
run: python3 ./scripts/build_proto.py
# Build
- name: Build
run: python3 -m build
# Install our package (required for the tests to find the namespace : MF.V3)
- name: Install
run: pip3 install ./dist/maf_three-0.0.0-py3-none-any.whl
# Run the tests
- name: Test
run: python3 -m pytest
# Build the documentation
- name: Documentation
run: python3 ./scripts/build-doc.py