Skip to content

Commit c3d7038

Browse files
committed
feat: add GitHub Actions workflow for pull request testing
1 parent b101fbe commit c3d7038

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
name: On Push
2-
#for every push on any branch
1+
name: On Pull Request
32
on:
4-
push:
3+
pull_request:
54
branches:
65
- "*"
76

@@ -18,59 +17,44 @@ jobs:
1817
python-version: ["3.12", "3.13"]
1918

2019
steps:
21-
- name: Check branch name format
22-
id: check_branch
23-
run: |
24-
if [[ "${GITHUB_REF_NAME}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-dev-.*$ ]] || [[ "${GITHUB_REF_NAME}" == "main" ]]; then
25-
echo "match=true" >> $GITHUB_OUTPUT
26-
else
27-
echo "match=false" >> $GITHUB_OUTPUT
28-
fi
2920

3021
- uses: actions/checkout@v4
31-
if: steps.check_branch.outputs.match == 'true'
3222
with:
3323
fetch-depth: 0 # Fetch all history for all tags
3424

3525
- name: install make
36-
if: steps.check_branch.outputs.match == 'true'
3726
run: sudo apt-get install -y make
3827

3928
- name: setup Python ${{ matrix.python-version }}
40-
if: steps.check_branch.outputs.match == 'true'
4129
uses: actions/setup-python@v5
4230
with:
4331
python-version: ${{ matrix.python-version }}
4432

4533
- name: install python dependencies
46-
if: steps.check_branch.outputs.match == 'true'
4734
run: |
4835
python -m pip install --upgrade pip
4936
pip install build pytest
5037
5138
- name: setup nodejs
52-
if: steps.check_branch.outputs.match == 'true'
5339
uses: actions/setup-node@v4
5440
with:
5541
node-version: '18'
5642

5743
- name: install nodejs dependencies
58-
if: steps.check_branch.outputs.match == 'true'
5944
run: npm install --global sass typescript
6045

6146
- name: build
62-
if: steps.check_branch.outputs.match == 'true'
6347
run: make tests VERSION=${{ github.ref_name }}
6448

6549
- name: publish test report
66-
if: steps.check_branch.outputs.match == 'true' && (success() || failure())
50+
if: success() || failure()
6751
uses: mikepenz/action-junit-report@v5
6852
with:
6953
report_paths: 'test-report.xml'
7054
include_passed: true
7155

7256
- name: upload tests server logs
73-
if: steps.check_branch.outputs.match == 'true' && (success() || failure())
57+
if: success() || failure()
7458
uses: actions/upload-artifact@v4
7559
with:
7660
name: tests-server-logs

0 commit comments

Comments
 (0)