|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | test: |
| 10 | + strategy: |
| 11 | + max-parallel: 1 |
| 12 | + fail-fast: true |
| 13 | + matrix: |
| 14 | + python_version: |
| 15 | + # https://python-release-cycle.glitch.me/ |
| 16 | + - "3.6" |
| 17 | + - "3.7" |
| 18 | + - "3.8" |
| 19 | + - "3.9" |
10 | 20 | runs-on: ubuntu-latest |
11 | 21 | steps: |
12 | 22 | - uses: actions/checkout@v2 |
13 | 23 |
|
14 | 24 | - uses: actions/setup-python@v2 |
15 | 25 | with: |
16 | | - python-version: '3.8' |
| 26 | + python-version: ${{ matrix.python_version }} |
17 | 27 |
|
18 | | - - name: Install pipenv |
19 | | - run: python -m pip install pipenv |
| 28 | + - name: Install Poetry |
| 29 | + run: python -m pip install poetry poetry-dynamic-versioning |
20 | 30 |
|
21 | 31 | - uses: actions/cache@v2 |
22 | | - name: Cache Pipenv dependencies |
| 32 | + name: Cache Poetry dependencies |
23 | 33 | with: |
24 | 34 | path: | |
25 | 35 | ~/.cache |
26 | 36 | ~/.local/share/virtualenvs/ |
27 | | - key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} |
| 37 | + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} |
28 | 38 | restore-keys: | |
29 | | - ${{ runner.os }}-pipenv- |
| 39 | + ${{ runner.os }}-poetry- |
30 | 40 |
|
31 | 41 | - name: Get dependencies |
32 | | - run: pipenv install -d |
| 42 | + run: poetry install |
33 | 43 |
|
34 | 44 | - name: Lint |
35 | 45 | continue-on-error: true |
36 | 46 | run: | |
37 | 47 | # stop the build if there are Python syntax errors or undefined names |
38 | | - pipenv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
| 48 | + poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
39 | 49 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
40 | | - pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 50 | + poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
41 | 51 |
|
42 | | - - name: Travis Test - Start agent |
43 | | - id: start_agent |
44 | | - env: |
45 | | - PYTHON_SDC_TEST_ACCESS_KEY: ${{ secrets.STAGING_AGENT_KEY }} |
46 | | - run: | |
47 | | - sudo apt-get install linux-headers-$(uname -r) dkms gcc-multilib g++-multilib |
48 | | - ./test/start_agent.sh |
49 | | -
|
50 | | - - name: Travis Test - Install dependencies |
51 | | - run: pip install . |
52 | | - |
53 | | - - name: Travis Test - Secure APIs |
54 | | - env: |
55 | | - PYTHON_SDC_TEST_API_TOKEN: ${{ secrets.STAGING_SECURE_API_TOKEN }} |
56 | | - run: ./test/test_secure_apis.sh |
57 | 52 |
|
58 | 53 | - name: Test in staging |
59 | 54 | env: |
60 | 55 | SDC_MONITOR_TOKEN: ${{ secrets.STAGING_MONITOR_API_TOKEN }} |
61 | 56 | SDC_SECURE_TOKEN: ${{ secrets.STAGING_SECURE_API_TOKEN }} |
62 | 57 | SDC_MONITOR_URL: "https://app-staging.sysdigcloud.com" |
63 | 58 | SDC_SECURE_URL: "https://secure-staging.sysdig.com" |
64 | | - run: | |
65 | | - pipenv run mamba -f documentation |
66 | | -
|
67 | | - - name: Travis Test - Stop agent |
68 | | - run: ./test/stop_agent.sh |
69 | | - if: steps.start_agent.outcome == 'success' |
| 59 | + run: poetry run mamba -f documentation -t integration |
0 commit comments