Skip to content

Commit 71889c3

Browse files
authored
Fix code scanning alerts by adding permissions decl. (#68)
* Fix code scanning alerts by adding permissions decl. This addressess the following code scanning alerts: - https://github.com/quantumlib/OpenFermion-PySCF/security/code-scanning/1 - https://github.com/quantumlib/OpenFermion-PySCF/security/code-scanning/2 * Update versions of Python & runner OS Those old versions are no longer available on GitHub.
1 parent 297d3c1 commit 71889c3

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,28 @@ name: Continuous Integration
1717

1818
on: [pull_request]
1919

20+
# Declare default permissions as read only.
21+
permissions: read-all
22+
2023
jobs:
21-
pytest:
22-
name: Pytest Ubuntu python3.6
23-
runs-on: ubuntu-16.04
24+
pytest-matrix:
25+
name: Run Pytest on Python ${{matrix.python-version}}
26+
strategy:
27+
matrix:
28+
python-version: ['3.9', '3.10', '3.11', '3.12']
29+
runs-on: ubuntu-22.04
2430
steps:
25-
- uses: actions/checkout@v1
26-
- uses: actions/setup-python@v1
27-
with:
28-
python-version: '3.6'
29-
architecture: 'x64'
30-
- name: Install requirements
31-
run: |
32-
pip install -r ./dev_tools/pip-list
33-
- name: Pytest check
34-
run: |
35-
pytest
36-
pytest37:
37-
name: Pytest Ubuntu python3.7
38-
runs-on: ubuntu-16.04
39-
steps:
40-
- uses: actions/checkout@v1
41-
- uses: actions/setup-python@v1
31+
- name: Get a local copy of the source repository
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
33+
34+
- name: Set up Python ${{matrix.python-version}}
35+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
4236
with:
43-
python-version: '3.7'
37+
python-version: ${{matrix.python-version}}
4438
architecture: 'x64'
39+
4540
- name: Install requirements
46-
run: |
47-
pip install -r ./dev_tools/pip-list
41+
run: pip install -r ./dev_tools/pip-list
42+
4843
- name: Pytest check
49-
run: |
50-
pytest
44+
run: pytest

0 commit comments

Comments
 (0)