|
10 | 10 | jobs: |
11 | 11 | housekeeping: |
12 | 12 | runs-on: ubuntu-latest |
| 13 | + container: qctrl/ci-images:python-3.11-ci |
13 | 14 | steps: |
14 | 15 | - uses: actions/checkout@v4 |
| 16 | + - name: Download CI tool |
| 17 | + shell: bash |
| 18 | + run: | |
| 19 | + curl -sSL http://ci.q-ctrl.com | bash - |
| 20 | + - name: Vault Login |
| 21 | + run: | |
| 22 | + ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
| 23 | + - name: Inject environment variables |
| 24 | + run: | |
| 25 | + /scripts/ci env prepareGitHub |
15 | 26 | - name: Perform housekeeping checks |
16 | 27 | env: |
17 | 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
18 | 29 | run: | |
19 | | - source <(curl -sL http://ci.q-ctrl.com) |
20 | | - ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
21 | | - ./ci docker run qctrl/ci-images:python-3.11-ci /scripts/housekeeping.sh |
| 30 | + git config --global --add safe.directory $GITHUB_WORKSPACE |
| 31 | + /scripts/housekeeping.sh |
22 | 32 |
|
23 | 33 | linting: |
24 | 34 | runs-on: ubuntu-latest |
| 35 | + container: qctrl/ci-images:python-3.11-ci |
25 | 36 | steps: |
26 | 37 | - uses: actions/checkout@v4 |
27 | | - - name: Install Python dependencies |
| 38 | + - name: Download CI tool |
| 39 | + shell: bash |
| 40 | + run: | |
| 41 | + curl -sSL http://ci.q-ctrl.com | bash - |
| 42 | + - name: Vault Login |
28 | 43 | run: | |
29 | | - source <(curl -sL http://ci.q-ctrl.com) |
30 | 44 | ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
31 | | - ./ci docker run qctrl/ci-images:python-3.11-ci /scripts/install-python-dependencies.sh |
| 45 | + - name: Install Python dependencies |
| 46 | + run: | |
| 47 | + git config --global --add safe.directory $GITHUB_WORKSPACE |
| 48 | + /scripts/install-python-dependencies.sh |
32 | 49 | - name: Run Pre-Commit |
33 | 50 | run: | |
34 | | - ./ci docker run qctrl/ci-images:python-3.11-ci poetry run pre-commit run -- -a |
| 51 | + poetry run pre-commit run -- -a |
35 | 52 |
|
36 | 53 | pytest: |
37 | 54 | runs-on: ubuntu-latest |
| 55 | + container: qctrl/ci-images:python-${{ matrix.python }}-ci |
38 | 56 | strategy: |
39 | 57 | matrix: |
40 | 58 | python: ["3.10", "3.11", "3.12", "3.13"] |
41 | 59 | steps: |
42 | 60 | - uses: actions/checkout@v4 |
43 | | - - name: Install Python dependencies |
| 61 | + - name: Download CI tool |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + curl -sSL http://ci.q-ctrl.com | bash - |
| 65 | + - name: Vault Login |
44 | 66 | run: | |
45 | | - source <(curl -sL http://ci.q-ctrl.com) |
46 | 67 | ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
47 | | - ./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/install-python-dependencies.sh |
| 68 | + - name: Install Python dependencies |
| 69 | + run: | |
| 70 | + git config --global --add safe.directory $GITHUB_WORKSPACE |
| 71 | + /scripts/install-python-dependencies.sh |
48 | 72 | - name: Run Pytest |
49 | 73 | run: | |
50 | | - ./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/pytest.sh |
| 74 | + /scripts/pytest.sh |
51 | 75 |
|
52 | 76 | publish_internally: |
53 | 77 | runs-on: ubuntu-latest |
| 78 | + container: qctrl/ci-images:python-3.11-ci |
54 | 79 | steps: |
55 | 80 | - uses: actions/checkout@v4 |
| 81 | + - name: Download CI tool |
| 82 | + shell: bash |
| 83 | + run: | |
| 84 | + curl -sSL http://ci.q-ctrl.com | bash - |
| 85 | + - name: Vault Login |
| 86 | + run: | |
| 87 | + ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
| 88 | + - name: Inject environment variables |
| 89 | + run: | |
| 90 | + /scripts/ci env prepareGitHub |
56 | 91 | - name: Publish development version |
57 | 92 | env: |
58 | 93 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
59 | 94 | run: | |
60 | | - source <(curl -sL http://ci.q-ctrl.com) |
61 | | - ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} |
62 | | - ./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-dev-version.sh |
| 95 | + git config --global --add safe.directory $GITHUB_WORKSPACE |
| 96 | + /scripts/publish-dev-version.sh |
0 commit comments