fix: api/requirements.txt to reduce vulnerabilities #94
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: test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: shell_test | |
run: | | |
wget "https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz" && \ | |
tar --xz -xvf "shellcheck-stable.linux.x86_64.tar.xz" && \ | |
shellcheck() { "shellcheck-stable/shellcheck" "$@"; } && \ | |
shellcheck --version && \ | |
/bin/bash --version && /bin/bash -n bin/poseidon && shellcheck -x -e SC2016 -e SC2119 -e SC2129 -e SC2001 -e SC2044 bin/poseidon | |
- name: unit_test | |
run: | | |
export DEBIAN_FRONTEND=noninteractive && \ | |
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections | |
export PYTHONPATH=$PWD/poseidon:$PYTHONPATH | |
export POSEIDON_CONFIG=$PWD/config/poseidon.config | |
echo "127.0.0.1 localhost redis" | sudo tee -a /etc/hosts | |
sudo apt-get update && \ | |
sudo apt-get install -yq --no-install-recommends python3.7 python3.7-dev && \ | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 && \ | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 && \ | |
sudo apt-get install tshark && \ | |
docker run -d -p 6379:6379 redis:latest && \ | |
pip3 install -U pip && \ | |
pip3 install codecov scikit-build && \ | |
find . -name requirements.txt -type f -exec pip3 install -r {} \; && \ | |
find . -name test-requirements.txt -type f -exec pip3 install -r {} \; && \ | |
export PATH=/home/runner/.local/bin:$PATH && \ | |
py.test -v -vv --cov-report term-missing --cov=. -c .coveragerc && \ | |
coverage report && coverage xml | |
- name: docker_test | |
run: make run_tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1.0.5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
if: github.repository == 'cyberreboot/poseidon' && github.event_name == 'push' |