-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prod: stop all jobs when bot is down
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,17 +69,24 @@ jobs: | |
environment-name: cf-scripts | ||
condarc-file: autotick-bot/condarc | ||
|
||
- name: stop me if needed | ||
run: | | ||
python autotick-bot/stop_me_if_needed.py | ||
- name: configure conda and install code | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
pip install --no-deps --no-build-isolation -e . | ||
- name: Set up git | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
git config --global user.name regro-cf-autotick-bot | ||
git config --global user.email [email protected] | ||
git config --global pull.rebase false | ||
- name: test versions | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
cd .. | ||
python -c "import conda_forge_tick; assert conda_forge_tick.__version__ != '0.0.0'" | ||
|
@@ -98,20 +105,24 @@ jobs: | |
- name: start MongoDB | ||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
mongodb-version: "latest" | ||
|
||
- name: test mongodb is OK | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
python -c "from pymongo import MongoClient; import os; print(MongoClient(os.environ['MONGODB_CONNECTION_STRING']))" | ||
env: | ||
MONGODB_CONNECTION_STRING: "mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000" | ||
|
||
- name: set up docker buildx | ||
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
|
||
- name: build docker image | ||
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
context: . | ||
push: false | ||
|
@@ -120,6 +131,7 @@ jobs: | |
|
||
- name: restore test durations | ||
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
path: .test_durations | ||
key: test-durations-${{ github.ref }}-${{ github.sha }} | ||
|
@@ -128,6 +140,7 @@ jobs: | |
test-durations- | ||
- name: run pytest | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
export TEST_BOT_TOKEN_VAL=unpassword | ||
# note: we do not use pytest-xdist (-n auto) here for now because they interfere with hiding the | ||
|
@@ -157,13 +170,15 @@ jobs: | |
|
||
- name: upload test durations | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
name: test-durations-${{ matrix.group }} | ||
path: .test_durations.${{ matrix.group }} | ||
include-hidden-files: true | ||
|
||
- name: upload coverage | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
name: coverage-${{ matrix.group }} | ||
path: .coverage | ||
|
@@ -205,23 +220,31 @@ jobs: | |
environment-name: cf-scripts | ||
condarc-file: autotick-bot/condarc | ||
|
||
- name: stop me if needed | ||
run: | | ||
python autotick-bot/stop_me_if_needed.py | ||
- name: download coverage artifacts | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
pattern: coverage-* | ||
|
||
- name: combine coverage | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
coverage combine coverage-*/.coverage* | ||
coverage xml | ||
- name: upload codecov | ||
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.8 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: cache test durations | ||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
path: .test_durations | ||
key: test-durations-${{ github.ref }}-${{ github.sha }} | ||
|
@@ -231,15 +254,18 @@ jobs: | |
- name: download test duration artifacts | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
pattern: test-durations-* | ||
|
||
- name: combine test durations | ||
if: ${{ ! env.CI_SKIP }} | ||
run: | | ||
jq '. + input' test-durations-*/.test_durations.* > .test_durations | ||
- name: upload test durations | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
if: ${{ ! env.CI_SKIP }} | ||
with: | ||
name: test-durations | ||
path: .test_durations | ||
|