-
Notifications
You must be signed in to change notification settings - Fork 14
98 lines (78 loc) · 2.99 KB
/
tool-tests.yml
File metadata and controls
98 lines (78 loc) · 2.99 KB
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
name: Tool Tests
env:
MICROSOFT_EMAIL: gindibay@microsoft.com
USER_NAME: Gurkan Indibay
MAIN_BRANCH: all-citus
on:
push:
branches:
- "**"
workflow_dispatch:
jobs:
make-install:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install all scripts
run: make && sudo make install
unit_test_execution:
runs-on: ubuntu-latest
steps:
- name: Create GitHub App token
id: app
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
owner: citusdata
repositories: |
tools
packaging
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ steps.app.outputs.token }}
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Define git credentials
run: git config --global user.email "${MICROSOFT_EMAIL}"&& git config --global user.name "${USER_NAME}"
- name: Install package dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: Run static code analysis
run: python -m prospector
- name: Validate code format
run: black . --check
- name: Unit tests for "Common tools"
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_common_tool_methods.py
- name: Unit tests for "Update Package Properties"
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_update_package_properties.py
# no longer viable, outdated test, skipping to not block the pipeline
# - name: Unit tests for "Prepare Release"
# run: python -m pytest -q packaging_automation/tests/test_prepare_release.py
- name: Unit tests for "Update Docker"
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_update_docker.py
- name: Unit tests for "Update Pgxn"
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_update_pgxn.py
- name: Packaging Warning Handler
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
run: python -m pytest -q packaging_automation/tests/test_packaging_warning_handler.py