-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (35 loc) · 1.18 KB
/
tests.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
name: tests ci
# This workflow runs the pipeline with the minimal test dataset to check that it completes any errors
on:
push:
branches: [develop]
pull_request_target:
branches: [develop]
release:
types: [published]
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (dev)
runs-on: ubuntu-latest
# Only run for the official repo, for releases and merged PRs
if: ${{ github.repository == 'BU-ISCIII/taranis' }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Build new docker image
run: docker build --no-cache . -t buisciii/taranis:dev
- name: Push Docker image to DockerHub (develop)
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push buisciii/taranis:dev
run-tests:
name: Run tests
needs: push_dockerhub
runs-on: ubuntu-latest
steps:
- name: Run pipeline with test data
run: |
docker run buisciii/taranis:dev bash -c /opt/taranis/test/test.sh