generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.7 KB
/
dev_container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This workflow tests that the dev container configuration within
# opensafely/research-template is correct with respect to the tests within
# `tests/dev_container.sh`. Notice that the dev container configuration lives in a
# different repository. This is because opensafely/research-template is a template
# repository; its contents are copied to multiple other repositories. Rather than test
# the dev container configuration in each of these multiple other repositories, we test
# it here, and assume that the copies don't deviate from the template repository. Doing
# so reduces the cost of updating the tests.
name: Test research template dev container
on:
schedule:
- cron: "18 8 * * *"
workflow_dispatch:
jobs:
dev-container:
runs-on: ubuntu-latest
steps:
- name: Checkout research-template repository
uses: actions/checkout@v4
with:
repository: 'opensafely/research-template'
- name: Checkout research-template-docker repository in subdirectory
uses: actions/checkout@v4
with:
path: 'research-template/research-template-docker'
- name: Test dev container
uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 # v0.3.1900000349
with:
runCmd: ./research-template/research-template-docker/tests/dev_container.sh
- name: Notify Slack on failure
if: failure() && github.event_name == 'schedule'
uses: zuplo/github-action-slack-notify-build@cf8e7e66a21d76a8125ea9648979c30920195552 # v2
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel_id: C069SADHP1Q
status: "Scheduled dev container test run failure"
color: danger