-
Notifications
You must be signed in to change notification settings - Fork 133
117 lines (91 loc) · 4.06 KB
/
ci_full.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
111
112
113
114
115
116
117
---
name: galaxy_ng/ci
on: {pull_request: {branches: ['**']}, push: {branches: ['**']}}
jobs:
check_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.after }} # for PR avoids checking out merge commit
fetch-depth: 0 # include all history
- name: Run script to validate commits for both pull request and a push
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
GITHUB_PULL_REQUEST: ${{ github.event.number }}
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
GITHUB_BRANCH: ${{ github.head_ref }}
GITHUB_REPO_SLUG: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
GITHUB_USER: ${{ github.event.pull_request.user.login }}
GITHUB_PR_COMMITS_URL: ${{ github.event.pull_request.commits_url }}
START_COMMIT: ${{ github.event.before }}
END_COMMIT: ${{ github.event.after }}
run: |
python .ci/scripts/validate_commit_message_custom.py
lint_po:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.after }} # for PR avoids checking out merge commit
fetch-depth: 0 # include all history
- name: intsall and run lint-po
run: |
pip install lint-po
lint-po ./galaxy_ng/locale/*/LC_MESSAGES/*.po
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.after }} # for PR avoids checking out merge commit
fetch-depth: 0 # include all history
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install requirements
run: pip3 install -r lint_requirements.txt
- name: Run extra lint checks
run: "[ ! -x .ci/scripts/extra_linting.sh ] || .ci/scripts/extra_linting.sh"
- name: Check manifest
run: check-manifest
- name: Check for pulpcore imports outside of pulpcore.plugin
run: sh .ci/scripts/check_pulpcore_imports.sh
- name: Check for gettext problems
run: sh .ci/scripts/check_gettext.sh
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/checkout@v4
- name: install ansible
run: pip3 install ansible
- name: install python-requests
run: pip3 install requests
- name: run the build container playbook
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v build_container.yaml
- name: run the start container playbook
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v start_container.yaml
- name: run the unit test playbook
run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_unit_tests.yaml
- name: upload jUnit XML test results
if: github.event_name == 'push' && github.repository == 'ansible/galaxy_ng' && github.ref_name == 'master'
continue-on-error: true
run: >-
docker exec pulp /bin/bash -c 'curl -v --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}"
--form "xunit_xml=@/tmp/galaxy_ng-test-results.xml"
--form "component_name=hub"
--form "git_commit_sha=${{ github.sha }}"
--form "git_repository_url=https://github.com/${{ github.repository }}"
"${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/"'
# FIXME: do we really care about these anymore ... ?
#- name: run the functional test playbook
# run: cd dev/playbooks; ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -i 'localhost,' --forks=1 -v run_functional_tests.yaml