Skip to content

Commit

Permalink
Adds CI pipeline code for PRs (#6)
Browse files Browse the repository at this point in the history
* Adds CI pipeline code for PRs

* Fixes folder name

* Deletes unneeded lines

* Deletes [skip ci] config for now

* Adds types to PR config

* Adds other type to PR trigger

* Tries with absolute path

* Adds temporary debug step

* Adds temporary debug command

* Updates config to fetch all history on checkout

* Tries without reusable workflow

* Removes unneeded debug commands

* Just a check

* Just a check

* Fix lint

* Makes token available

* Updates actions to use Node 20

* Updates actions versions to use Node.js 20
  • Loading branch information
y4izus authored Jun 28, 2024
1 parent 6b6a846 commit 976d9c3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI Pipeline

on:
pull_request:
types: [opened, reopened, edited, ready_for_review, synchronize]

jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements-dev.txt
- name: Run lint
run: |
python -m black --check .
run-tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.11, 3.8]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./requirements-dev.txt
- name: Run tests
env:
QISKIT_IBM_TOKEN: ${{ secrets.QISKIT_IBM_TOKEN }}
run: |
python -m pytest .
1 change: 0 additions & 1 deletion ai-transpiler-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"qiskit_lvl3_ai_transpiler_service = TranspilerService(\n",
" backend_name=\"ibm_torino\",\n",
" ai=True,\n",
Expand Down

0 comments on commit 976d9c3

Please sign in to comment.