Potential fix for code scanning alert no. 1: Workflow does not contain permissions #18
This file contains hidden or 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: Simvue-CLI (macOS) | |
on: | |
push: | |
branches: ["main", "dev"] | |
pull_request: | |
branches: ["main", "dev"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test_build: | |
name: Test CLI | |
timeout-minutes: 20 | |
runs-on: ["macos-latest"] | |
steps: | |
- name: Retrieve Code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: | | |
python -m pip install pytest pytest-cov | |
python -m pip install . | |
- name: Run Tests | |
env: | |
SIMVUE_URL: ${{ secrets.SIMVUE_URL }} | |
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }} | |
run: | | |
python -m pytest -x --cov=simvue_cli --cov-report=term --cov-report=xml -c /dev/null -p no:warnings -v |