This repository has been archived by the owner on May 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
84 lines (74 loc) · 2.21 KB
/
python-app.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
development_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
- name: Lint with flake8
run: flake8 ./
- name: mypy
run: mypy ./osd2f/ --ignore-missing-imports
- name: Test with pytest
run: pytest ./
- name: Install & do a dry run
run: |
pip install -e ./
osd2f --dry-run
- name: Check config generation functionality
run: |
osd2f --generate-current-config cc.yaml
[ -s cc.yaml ] #check whether the file is not empty
- name: Run Jest
uses: stefanoeb/jest-action@1.0.3
release_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install with plain pip
run: pip install ./
- name: Do a dry run
run: osd2f --dry-run
docker_build:
runs-on: ubuntu-latest
steps:
- name: checkout files
uses: actions/checkout@v4
- name: build Docker image
uses: docker/build-push-action@v4
with:
file: Dockerfile
push: false
load: ${{ github.event_name == 'pull_request' }}
context: .
docker_test_build:
runs-on: ubuntu-latest
steps:
- name: checkout files
uses: actions/checkout@v4
- name: build Docker image
uses: docker/build-push-action@v4
with:
file: Dockerfile-test
push: false
load: ${{ github.event_name == 'pull_request' }}
context: .