This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (63 loc) · 1.73 KB
/
sites-management-api-coverage.yaml
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
name: Sites Management API Coverage and Testing
on:
push:
paths:
- '.github/workflows/sites-management-api-coverage.yaml'
- sitesManagementAPI/**
- '!**.md'
- '!**.pdf'
- '!**.docx'
- '!**.gitignore'
- '!**.txt'
pull_request:
paths:
- sitesManagementAPI/**
- '!**.md'
- '!**.pdf'
- '!**.docx'
- '!**.gitignore'
- '!**.txt'
jobs:
run_tests:
name: Run management API tests
runs-on: ubuntu-latest
container: python:3.10
# job env variables
env:
MARIADB_USER: dev_user
MARIADB_PASSWORD: dev_pass
MARIADB_DATABASE: sites_man_db
MARIADB_HOST: db
MARIADB_PORT: 3306
services:
db:
image: mariadb
# container env variables
env:
MYSQL_USER: dev_user
MYSQL_PASSWORD: dev_pass
MYSQL_DATABASE: sites_man_db
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
defaults:
run:
working-directory: ./sitesManagementAPI
steps:
- name: Pulling git repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install tox and any other packages
run: |
pip install tox
- name: Run tox
run: tox -e py
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SITES_MANAGEMENT_API }}
with:
projectBaseDir: sitesManagementAPI/