Skip to content

Merge branch 'master' into newCapModel3 #113

Merge branch 'master' into newCapModel3

Merge branch 'master' into newCapModel3 #113

Workflow file for this run

############################################################
#
# Copyright 2017, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Mohammed El-Afifi
# This file is part of processorSim.
#
# processorSim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# processorSim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with processorSim. If not, see <http://www.gnu.org/licenses/>.
#
############################################################
on: [push]
jobs:
build:
env:
PIPENV_VERBOSITY: -1
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
sarifFile: snyk-code.sarif
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.13.1
- name: Python Pipenv Action
uses: tiagovrtr/actions-pipenv@v1
with:
pipenv-version: 2024.0.1
- name: Install dependencies
run: pipenv sync -d
- name: Set up Snyk CLI to check for security issues
# Snyk can be used to break the build when it detects security issues.
# In this case we want to upload the SAST issues to GitHub Code Scanning
uses: snyk/actions/[email protected]
- run: pipenv run ./test.sh
# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
# Use || true to not fail the pipeline
- name: Snyk Code test
run: snyk code test --sarif > $sarifFile # || true
- name: Snyk test
run: snyk test
- name: Install coveralls dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
- name: Snyk monitor
run: snyk monitor
# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ env.sarifFile }}