forked from optimizely/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 2.41 KB
/
github-action.yml
File metadata and controls
81 lines (75 loc) · 2.41 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python-SDK
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["2.7"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install flake8==3.6.0
python -m pip install flake8==3.6.0 pytest
- name: Linting
run: |
flake8
build_unit_testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5.4", "3.6", "3.7", "3.8"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements/core.txt;pip install -r requirements/test.txt
- name: Test
run: |
pytest --cov=optimizely
build_csharp_sdk:
name: Dispatch to `csharp-sdk`
runs-on: ubuntu-latest
steps:
- name: Emit repository_dispatch
uses: mvasigh/dispatch-action@main
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repo: csharp-sdk
owner: mnoman09
event_type: sample_push
build_integration_testing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v2
- name: Integration tests
env:
SDK: python
SDK_BRANCH: ${{ steps.extract_branch.outputs.branch }}
run: |
mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git && popd
$HOME/travisci-tools/trigger-script-with-status-update.sh