Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit a0bb6c8

Browse files
Rajib Chakravortystevegore
Rajib Chakravorty
authored andcommitted
Initiate Q-CTRL Cirq package (#1)
1 parent bb89c6e commit a0bb6c8

24 files changed

+2777
-3
lines changed

.github/workflows/on-push.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Push workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
paths-ignore: # Don't trigger on files that are updated by the CI
10+
- 'pyproject.toml' # Note changes to poetry.lock will still build
11+
- 'setup.py'
12+
- 'README.rst'
13+
14+
jobs:
15+
16+
housekeeping:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Perform housekeeping checks
21+
env:
22+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
source <(curl -sL http://ci.q-ctrl.com)
26+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
27+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh
28+
29+
linting:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: Install Python dependencies
34+
env:
35+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
36+
run: |
37+
source <(curl -sL http://ci.q-ctrl.com)
38+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
39+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/install-python-dependencies.sh
40+
- name: Run Pylint
41+
run: |
42+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylint_runner || true
43+
- name: Run Pylama
44+
run: |
45+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylama || true
46+
- name: Run Markdownlint
47+
run: |
48+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 mdl -- -ig . || true
49+
50+
pytest:
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python: [36, 37]
55+
steps:
56+
- uses: actions/checkout@v1
57+
- name: Install Python dependencies
58+
env:
59+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
60+
run: |
61+
source <(curl -sL http://ci.q-ctrl.com)
62+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
63+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/install-python-dependencies.sh
64+
- name: Run Pytest
65+
run: |
66+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/pytest.sh
67+
68+
publish_internally:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v1
72+
- name: Publish development version
73+
env:
74+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
run: |
77+
source <(curl -sL http://ci.q-ctrl.com)
78+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
79+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-dev-version.sh

.github/workflows/on-release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release workflow
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Update version in code
14+
env:
15+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
source <(curl -sL http://ci.q-ctrl.com)
19+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
20+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh
21+
- name: Publish publicly
22+
env:
23+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: |
26+
source <(curl -sL http://ci.q-ctrl.com)
27+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-publicly.sh
28+
- name: Publish internally
29+
env:
30+
GCLOUD_CONTAINER_AUTH: ${{ secrets.GCLOUD_CONTAINER_AUTH }}
31+
run: |
32+
./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-release-internally.sh

0 commit comments

Comments
 (0)