Skip to content

Commit 9f4fd55

Browse files
authored
Create main.yml
1 parent dd61a26 commit 9f4fd55

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Run Python unit tests
24+
run: python3 -u -m unittest tests/tests.py
25+
26+
- name: Verify that the Docker image for the action builds
27+
run: docker build . --file Dockerfile
28+
29+
- name: Integration test
30+
id: integration
31+
uses: ./
32+
with:
33+
input-one: something
34+
input-two: true
35+
36+
- name: Output the outputs of the integration test of the action
37+
run: |
38+
echo "output-one = ${{ steps.integration.outputs.output-one }}"
39+
echo "output-two = ${{ steps.integration.outputs.output-two }}"
40+
41+
- name: Verify integration test results
42+
run: python3 -u -m unittest tests/integration.py

0 commit comments

Comments
 (0)