-
Notifications
You must be signed in to change notification settings - Fork 3
Version 2.1.0 with support for Shapeshifer 3.1.0 #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fe0c34d to
3737341
Compare
318aa7c to
b1ad9fa
Compare
| name: python | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: | ||
| - "3.11" | ||
| - "3.12" | ||
| - "3.13" | ||
| steps: | ||
| - name: Checkout Source | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.11 | ||
| - name: Install Dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install . | ||
| pip install .[dev] | ||
| - name: Run Tests | ||
| run: | | ||
| pip install pytest pytest-cov | ||
| pytest | ||
| - uses: actions/checkout@v5 | ||
| - name: Install uv and set the Python version | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install the project | ||
| run: uv sync --locked --all-extras --dev | ||
| - name: Run tests |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix this problem, you should explicitly set the least privileges needed by the workflow job. In this specific workflow, the job only needs to check out the code and install dependencies to run tests; it does not need write access. Thus, adding a permissions block at the job level (inside python-test:) or at the workflow root (top-level, for all jobs) with contents: read suffices. Since there is currently only one job, either location is fine, but including it at the job level gives you flexibility for future jobs.
Edit the .github/workflows/test.yml file:
Add the following keys within the python-test: job, just after runs-on: ubuntu-latest (e.g., after line 10):
permissions:
contents: readNo new methods, imports, or definitions are required since this is a YAML workflow configuration.
-
Copy modified lines R11-R12
| @@ -8,6 +8,8 @@ | ||
| python-test: | ||
| name: python | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| python-version: |
This version adds support for the upcoming Shapeshifter 3.1.0, as requested in #19.