Skip to content

Commit deabeb7

Browse files
Create main.yml
1 parent d16a9d2 commit deabeb7

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
name: Build
3+
4+
on:
5+
workflow_dispatch:
6+
jobs:
7+
test_puppeteer_pdf:
8+
name: Puppeteer test on ${{ matrix.os }}
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, ubuntu-20.04, ubuntu-22.04]
13+
steps:
14+
- name: Set environment variable
15+
run: echo "RUNNING_ON_GITHUB=1" >> $GITHUB_ENV
16+
- uses: actions/checkout@v4
17+
- name: Setup dotnet
18+
uses: actions/setup-dotnet@v4
19+
- name: exec dotnet test
20+
run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator/roles/tests-unit/files/FWO.Test && dotnet restore && dotnet build && dotnet test --filter "Name=HtmlToPdfTest"
21+
env:
22+
RUNNING_ON_GITHUB_ACTIONS: ${{ env.RUNNING_ON_GITHUB }}
23+
24+
test_ubuntu_latest:
25+
name: test build on ${{ matrix.os }}
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: [ubuntu-latest, ubuntu-20.04, ubuntu-22.04]
30+
steps:
31+
- name: Set environment variable
32+
run: echo "RUNNING_ON_GITHUB=1" >> $GITHUB_ENV
33+
- uses: actions/checkout@v4
34+
- name: do test install in case of merged pull request
35+
run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e force_install=true site.yml -K
36+
env:
37+
RUNNING_ON_GITHUB_ACTIONS: ${{ env.RUNNING_ON_GITHUB }}
38+
39+
test_ubuntu_latest_selfhosted:
40+
name: test build on ubuntu-latest_selfhosted
41+
runs-on: self-hosted
42+
steps:
43+
- name: Set environment variable
44+
run: echo "RUNNING_ON_GITHUB=1" >> $GITHUB_ENV
45+
- uses: actions/checkout@v4
46+
- name: clone repo
47+
run: git clone https://github.com/SolidProgramming/firewall-orchestrator.git -b puppeteer
48+
- name: do test install in case of merged pull request
49+
run: cd firewall-orchestrator && ansible-playbook -e force_install=true site.yml -K
50+
env:
51+
RUNNING_ON_GITHUB_ACTIONS: ${{ env.RUNNING_ON_GITHUB }}

0 commit comments

Comments
 (0)