Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
myoung34 committed Jun 12, 2020
1 parent 8ea6f36 commit 0e28a84
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 7 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ jobs:
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
clair:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Build
run: docker buildx build -t myoung34/tilty:latest --output "type=image,push=false" --platform linux/amd64 .
- name: Build the stack
run: docker-compose -f docker-compose-clair.yml up -d
- name: Wait
run: sleep 5
- name: Download Clair-Scanner
run: curl https://github.com/arminc/clair-scanner/releases/download/v12/clair-scanner_linux_amd64 -o clair-scanner && chmod +x clair-scanner
- name: Test
run: ./clair-scanner --ip $(ip -f inet addr show eth0 | grep -Po 'inet \K[\d.]+') myoung34/tilty:latest
18 changes: 18 additions & 0 deletions docker-compose-clair.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '2'

services:
clair:
image: arminc/clair-local-scan:latest
ports:
- "6060:6060"
depends_on:
- postgres
networks:
- clairnet
postgres:
image: arminc/clair-db:latest
networks:
- clairnet
networks:
clairnet:
driver: bridge
121 changes: 115 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ requests = "^2.22"
jinja2 = "^2.11.1"
influxdb = "^5.2.3"
datadog = "^0.34.1"
coveralls = "^1.11.1"

[tool.poetry.dev-dependencies]
bandit = "^1.6.2"
coveralls = "^1.11.1"
flake8 = "^3.7"
pytest = "^5.3"
pylint = "^2.4"
Expand Down

0 comments on commit 0e28a84

Please sign in to comment.