Merge pull request #153 from attilamester/feature/132-linkshow-instru… #166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache `docker build` | |
id: cache-docker-build | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}--${{ hashFiles('build/radare2-5.8.8/Dockerfile', 'Dockerfile', 'docker-compose.yml') }} | |
path: ~/image_malflow.tar | |
- name: Building the test container - `docker build` & `docker save` | |
if: ${{ steps.cache-docker-build.outputs.cache-hit != 'true' }} | |
run: | | |
docker compose build --no-cache malflow_test | |
docker save image_malflow > ~/image_malflow.tar | |
- name: Testing | |
run: | | |
docker load --input ~/image_malflow.tar | |
docker compose up malflow_test --exit-code-from malflow_test | |
- name: Testing on image classification module | |
run: | | |
docker load --input ~/image_malflow.tar | |
docker compose up malflow_image_classification_test --exit-code-from malflow_image_classification_test | |
- name: Code Coverage Report | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: romeovs/lcov-reporter-action@v0.2.11 | |
with: | |
lcov-file: ./test/coverage.lcov | |
github-token: ${{ secrets.GITHUB_TOKEN }} |