-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.12 KB
/
main.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
44
45
46
47
48
49
50
51
52
---
name: Run tests and conditionally build container
on:
push:
branches:
- '*'
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
pull_request:
branches:
- '*'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Static Analysis
uses: pre-commit/[email protected]
- name: Build Docker Image
uses: docker/[email protected]
with:
context: .
build-args: notebook_type=jupyter
push: false
- name: Install dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Run unit tests
run: python -m pytest tests/ -s -v
docker-build-push-jupyter:
if: ${{ github.event_name == 'push' }}
needs: [tests]
uses: "./.github/workflows/docker_build_push.yml"
secrets: inherit
with:
NOTEBOOK_TYPE: jupyter
docker-build-push-rstudio:
if: ${{ github.event_name == 'push' }}
needs: [tests]
uses: "./.github/workflows/docker_build_push.yml"
secrets: inherit
with:
NOTEBOOK_TYPE: rstudio
...