-
Notifications
You must be signed in to change notification settings - Fork 58
51 lines (38 loc) · 2 KB
/
testrun.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - run: docker-compose -f docker-compose.ci.yml pull # don't cache this
# - run: docker-compose -f docker-compose.ci.yml build cisgo redis # don't cache this
- run: docker pull python:3.8-slim
- run: docker pull apcela/cisshgo:v0.1.0
- run: docker pull redis:6.0.7-alpine
- uses: satackey/[email protected]
continue-on-error: true
with:
key: ci-tests-{hash}
restore-keys: |
ci-tests-
- name: Build the stack
# run: docker-compose -f ./docker-compose.dev.yml up -d
run: docker-compose -f docker-compose.ci.yml build --parallel
- run: docker-compose -f docker-compose.ci.yml up -d
- id: test_nolab
name: integration tests
run: docker-compose -f docker-compose.ci.yml exec -T netpalm-controller pytest -m "not fulllab" -vv tests/integration
- id: test_cisgo
name: unit tests
run: docker-compose -f docker-compose.ci.yml exec -T netpalm-controller pytest -vv tests/unit
# run: docker-compose -f ./docker-compose.dev.yml run controller echo "asdf"
# - name: notify slack
# if: ${{ always() }}
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: abinoda/slack-action@master
# with:
# args: '{\"channel\":\"CUCQA382D\",\"blocks\": [ { \"type\": \"section\", \"text\": { \"type\": \"mrkdwn\", \"text\": \"Hey! ${{ github.actor }} just pushed to ${{ github.base_ref }} @ ${{ github.repositoryUrl }}. The Job status is ${{ job.status }}, the step outcome is ${{ steps.test.outcome }}, and the step conclusion is ${{ steps.test.conclusion }}!\" } } ]}'