-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scheduled CI task to validate local job-server setup
This required updating the setup scripts to skip the need to have `SOCIAL_AUTH_*` properly configured. The local job-server still runs fine w/o it, but it wouldn't be able to actually log users in from github. There's a CI jobs that is meant to notify #team-rap slack channel when this happens, but for reasons I am not sure of, it does seem to work. Seems like fixing it will mean addressing fact that our slack bot token setup is undocumented and unclear.
- Loading branch information
1 parent
d4b735a
commit d973da4
Showing
3 changed files
with
52 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Local job-server setup CI | ||
|
||
on: | ||
# just for testing in draft PRs, will remove | ||
push: | ||
schedule: | ||
# every day at 2:37am | ||
- cron: "37 2 * * *" | ||
|
||
jobs: | ||
test-local-job-server: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: "opensafely-core/setup-action@v1" | ||
with: | ||
python-version: "3.11" | ||
install-just: true | ||
|
||
- name: "Test local job server setup" | ||
# this should download, configure and successfully launch a local job-server | ||
# we test it to make sure we catch breaking changes in job-server configuration we need to update. | ||
run: | | ||
just _dotenv # we don't need a full devenv | ||
just job-server/configure username | ||
just job-server/create-workspace test-workspace | ||
exit 1 # force fail | ||
- name: "Notify Slack on Failure" | ||
if: failure() #&& github.ref_name == 'main' | ||
uses: zuplo/github-action-slack-notify-build@cf8e7e66a21d76a8125ea9648979c30920195552 # v2 | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
with: | ||
channel_id: "C069YDR4NCA" | ||
status: "Airlock local job-server integration test failure" | ||
color: danger | ||
|
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