From 9a94cb0ddf41fc3f8705054c6641c7f5a7064f17 Mon Sep 17 00:00:00 2001 From: Steve Gore Date: Tue, 26 Nov 2019 17:35:09 +1100 Subject: [PATCH 1/2] CI workflow update --- .github/workflows/on-push.yml | 30 ++++++++++-------------------- .github/workflows/on-release.yml | 10 +++------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index ff690f7..d345c42 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -5,11 +5,7 @@ on: branches: - '**' tags-ignore: - - '**' - paths-ignore: # Don't trigger on files that are updated by the CI - - 'pyproject.toml' # Note changes to poetry.lock will still build - - 'setup.py' - - 'README.rst' + - '*.*' jobs: @@ -19,51 +15,46 @@ jobs: - uses: actions/checkout@v1 - name: Perform housekeeping checks env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | source <(curl -sL http://ci.q-ctrl.com) ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh + ./ci docker run qctrl/python-build:3.7 /scripts/housekeeping.sh linting: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Install Python dependencies - env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} run: | source <(curl -sL http://ci.q-ctrl.com) ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/install-python-dependencies.sh + ./ci docker run qctrl/python-build:3.7 /scripts/install-python-dependencies.sh - name: Run Pylint run: | - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylint_runner || true + ./ci docker run qctrl/python-build:3.7 poetry run pylint_runner || true - name: Run Pylama run: | - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylama || true + ./ci docker run qctrl/python-build:3.7 poetry run pylama || true - name: Run Markdownlint run: | - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 mdl -- -ig . || true + ./ci docker run qctrl/python-build:3.7 mdl -- -ig . || true pytest: runs-on: ubuntu-latest strategy: matrix: - python: [36, 37] + python: [3.6, 3.7] steps: - uses: actions/checkout@v1 - name: Install Python dependencies - env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} run: | source <(curl -sL http://ci.q-ctrl.com) ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/install-python-dependencies.sh + ./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/install-python-dependencies.sh - name: Run Pytest run: | - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/pytest.sh + ./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/pytest.sh publish_internally: runs-on: ubuntu-latest @@ -71,9 +62,8 @@ jobs: - uses: actions/checkout@v1 - name: Publish development version env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | source <(curl -sL http://ci.q-ctrl.com) ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-dev-version.sh \ No newline at end of file + ./ci docker run qctrl/python-build:3.7 /scripts/publish-dev-version.sh \ No newline at end of file diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 7b0ae50..2805396 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -12,21 +12,17 @@ jobs: - uses: actions/checkout@v1 - name: Update version in code env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | source <(curl -sL http://ci.q-ctrl.com) ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh + ./ci docker run qctrl/python-build:3.7 /scripts/housekeeping.sh - name: Publish publicly env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | source <(curl -sL http://ci.q-ctrl.com) - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-publicly.sh + ./ci docker run qctrl/python-build:3.7 /scripts/publish-release-publicly.sh - name: Publish internally - env: - GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }} run: | - ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-internally.sh \ No newline at end of file + ./ci docker run qctrl/python-build:3.7 /scripts/publish-release-internally.sh From e7ae60091297b76f63be95560a6eca5ca6bbcd2e Mon Sep 17 00:00:00 2001 From: CI workflow Date: Tue, 26 Nov 2019 06:36:13 +0000 Subject: [PATCH 2/2] Update setup.py/README.rst to match pyproject.toml/README.md --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5e39e79..b112f04 100644 --- a/setup.py +++ b/setup.py @@ -27,14 +27,15 @@ version='0.0.2', description='Q-CTRL Qiskit Adapter', python_requires='<3.8,>=3.6.4', - project_urls={'repository': 'https://github.com/qctrl/python-qiskit'}, + project_urls={"repository": "https://github.com/qctrl/python-qiskit"}, author='Q-CTRL', author_email='support@q-ctrl.com', license='Apache-2.0', keywords='quantum computing open source engineering qiskit', classifiers=['Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Scientific/Engineering :: Visualization', 'Topic :: Software Development :: Embedded Systems', 'Topic :: System :: Distributed Computing'], packages=['qctrlqiskit'], + package_dir={"": "."}, package_data={}, install_requires=['numpy==1.*,>=1.16.0', 'qctrl-open-controls==3.*,>=3.0.0', 'qiskit-ibmq-provider==0.*,>=0.3.3', 'qiskit-terra==0.*,>=0.10.0', 'scipy==1.*,>=1.3.0', 'toml==0.*,>=0.10.0'], - extras_require={'dev': ['pylama', 'pylint', 'pylint-runner', 'pytest', 'sphinx==2.*,>=2.2.0']}, + extras_require={"dev": ["pylama", "pylint", "pylint-runner", "pytest", "sphinx==2.*,>=2.2.0"]}, )