Skip to content

Merge pull request #209 from radtrentasei/master #353

Merge pull request #209 from radtrentasei/master

Merge pull request #209 from radtrentasei/master #353

Workflow file for this run

# 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 }}!\" } } ]}'