Skip to content

Update CI worfklow actions & fix minor bug #909

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

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 40 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
name: Continuous Integration
on: [pull_request]

on:
pull_request:
types: [opened, synchronize]
branches:
- master

merge_group:
types:
- checks_requested

push:
branches:
- master

jobs:
format:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
cache: pip
- name: Install requirements
run: pip install -r dev_tools/requirements/envs/format.env.txt
- name: Format
Expand All @@ -21,11 +35,12 @@ jobs:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
cache: pip
- name: Install requirements
run: pip install -r dev_tools/requirements/envs/mypy.env.txt
- name: Type check
Expand All @@ -34,11 +49,12 @@ jobs:
name: Lint check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
cache: pip
- name: Install requirements
run: pip install -r dev_tools/requirements/envs/pylint.env.txt
- name: Lint
Expand All @@ -47,10 +63,11 @@ jobs:
name: Pytest max compat
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
cache: pip
- name: Install requirements
run: |
pip install -r dev_tools/requirements/max_compat/pytest-max-compat.env.txt
Expand All @@ -63,16 +80,18 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
cirq-version: [ 1.4.1 ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install requirements
run: |
pip install -r dev_tools/requirements/envs/pytest.env.txt
pip install cirq-core${{matrix.cirq-version}}
pip install cirq-core==${{matrix.cirq-version}}
- name: Pytest check
run: check/pytest
shell: bash
Expand All @@ -82,30 +101,33 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cirq-version: [ 1.4.1 ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install requirements
run: |
pip install -r dev_tools/requirements/envs/pytest-extra.env.txt
pip install cirq-core${{matrix.cirq-version}}
pip install cirq-core==${{matrix.cirq-version}}
- name: Pytest check resources
run: check/pytest -m 'not slow' src/openfermion/resource_estimates
shell: bash
coverage:
name: Coverage check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install requirements
run: pip install -r dev_tools/requirements/envs/pytest.env.txt
- name: Coverage check
run: check/pytest-and-incremental-coverage
run: check/pytest-and-incremental-coverage
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:
python-version: [ '3.10' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install requirements
run: |
pip install -r dev_tools/requirements/envs/pytest.env.txt
Expand Down