version 2 of the work (also uses pseudo-industrial data) #58
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: Security Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
security_check: | |
name: Security Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Miniconda | |
run: | | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda | |
export PATH="$HOME/miniconda/bin:$PATH" | |
hash -r | |
echo "source $HOME/miniconda/etc/profile.d/conda.sh" >> $HOME/.bashrc | |
source $HOME/.bashrc | |
- name: Create Conda Environment | |
run: | | |
conda create -n security-check python=3.10 -y | |
conda init bash | |
source $HOME/.bashrc | |
conda activate security-check | |
pip install -r requirements.txt | |
pip install safety | |
- name: Activate env and Check for Security Issues | |
run: | | |
source $HOME/miniconda/bin/activate security-check | |
safety check -r requirements.txt | |
- name: Cleanup | |
run: | | |
rm -f Miniconda3-latest-Linux-x86_64.sh |