Skip to content

Commit

Permalink
Merge pull request #1799 from crytic/detector-compilation-artifacts
Browse files Browse the repository at this point in the history
testing strategy + coverage workflow
  • Loading branch information
montyly authored Mar 28, 2023
2 parents 3c55228 + 91798e1 commit 2af8b0c
Show file tree
Hide file tree
Showing 15,369 changed files with 47,058 additions and 40,638 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 30 additions & 0 deletions .github/actions/upload-coverage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Derived from <https://github.com/pyca/cryptography/blob/SOME_REF/.github/actions/upload-coverage/action.yml>
# Originally authored by the PyCA Cryptography maintainers, and licensed under
# the terms of the BSD license:
# <https://github.com/pyca/cryptography/blob/main/LICENSE.BSD>

name: Upload Coverage
description: Upload coverage files

runs:
using: "composite"

steps:
# FIXME(jl): codecov has the option of including machine information in filename that would solve this unique naming
# issue more completely.
# This method has the limitation of 1 coverage file per run, limiting some coverage between online/offline tests.
- run: |
COVERAGE_UUID=$(python3 -c "import uuid; print(uuid.uuid4())")
echo "COVERAGE_UUID=${COVERAGE_UUID}" >> $GITHUB_OUTPUT
if [ -f .coverage ]; then
mv .coverage .coverage.${COVERAGE_UUID}
fi
id: coverage-uuid
shell: bash
- uses: actions/upload-artifact@v3.1.0
with:
name: coverage-data
path: |
.coverage.*
*.lcov
if-no-files-found: ignore
13 changes: 13 additions & 0 deletions .github/scripts/integration_test_runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# used to pass --cov=$path and --cov-append to pytest
if [ "$1" != "" ]; then
pytest "$1" tests/e2e/ -n auto
status_code=$?
python -m coverage report
else
pytest tests/e2e/ -n auto
status_code=$?
fi

exit "$status_code"
13 changes: 13 additions & 0 deletions .github/scripts/tool_test_runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# used to pass --cov=$path and --cov-append to pytest
if [ "$1" != "" ]; then
pytest "$1" tests/tools/read-storage/test_read_storage.py
status_code=$?
python -m coverage report
else
pytest tests/tools/read-storage/test_read_storage.py
status_code=$?
fi

exit "$status_code"
13 changes: 13 additions & 0 deletions .github/scripts/unit_test_runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# used to pass --cov=$path and --cov-append to pytest
if [ "$1" != "" ]; then
pytest "$1" tests/unit/
status_code=$?
python -m coverage report
else
pytest tests/unit/
status_code=$?
fi

exit "$status_code"
51 changes: 0 additions & 51 deletions .github/workflows/IR.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install ".[dev]"
pip install ".[test]"
solc-select use 0.4.25 --always-install
solc-select use 0.8.0 --always-install
solc-select use 0.5.1 --always-install
pip install typing_extensions==4.1.1
pip install importlib_metadata==4.8.3
- name: Set up nix
if: matrix.type == 'dapp'
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/detectors.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# Single deploy job since we're just deploying
build:
environment:
name: github-pages
name: Slither Documentation
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
Expand All @@ -34,13 +34,13 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- run: pip install -e ".[dev]"
- run: pdoc -o docs/ slither '!slither.tools' #TODO fix import errors on pdoc run
- run: pip install -e ".[doc]"
- run: pdoc -o html/ slither '!slither.tools' #TODO fix import errors on pdoc run
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload the doc
path: 'docs/'
path: './html/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
56 changes: 0 additions & 56 deletions .github/workflows/features.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/parser.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/read_storage.yml

This file was deleted.

Loading

0 comments on commit 2af8b0c

Please sign in to comment.