forked from openedx/credentials
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (105 loc) · 2.85 KB
/
ci.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
quality_and_translations_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: x64
- name: Install Dependencies
run: make requirements
- name: Install gettext
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y gettext
- name: Run Tests
run: |
make check_translations_up_to_date
make validate_translations
make quality
make check_keywords
make pii_check
unit_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["py38"]
django-version: ["django42"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: x64
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- name: Install Dependencies
run: make requirements
- name: Install Firefox
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y firefox xvfb
- name: Run Tests
env:
TOXENV: ${{ matrix.django-version }}
run: |
make static
make tests
code_coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["py38"]
django-version: ["django42"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: x64
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- name: Install Dependencies
run: make requirements
- name: Install Firefox
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y firefox xvfb
- name: Run Tests (required for code cov)
env:
TOXENV: ${{ matrix.django-version }}
run: |
make static
make tests
- name: Run code coverage
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: x64
- name: Install Dependencies
run: make requirements
- name: Build the docs
run: make docs