-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (43 loc) · 1.43 KB
/
main.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
name: Unit Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tcl tcllib expect ruby ruby-dev build-essential
pip install pyyaml
gem install --user-install asciidoctor-pdf
gem install --user-install rouge
echo "PATH=$PATH:$(ruby -e 'puts Gem.user_dir')/bin" >> $GITHUB_ENV
- name: Run Unit Tests
run: python3 9pm.py --option cmdl-supplied unit_tests/auto.yaml
- name: Publish Test Result
run: cat ~/.local/share/9pm/logs/last/result-gh.md >> $GITHUB_STEP_SUMMARY
- name: Generate Test Report
run: |
asciidoctor-pdf \
--theme report/theme.yml \
-a pdf-fontsdir=report/fonts \
~/.local/share/9pm/logs/last/report.adoc \
-o ~/.local/share/9pm/logs/last/report.pdf
- name: Upload Logs as Artifacts
uses: actions/upload-artifact@v4
with:
name: 9pm-logs
path: ~/.local/share/9pm/logs
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
with:
name: test-report
path: ~/.local/share/9pm/logs/last/report.pdf