-
Notifications
You must be signed in to change notification settings - Fork 409
69 lines (58 loc) · 1.93 KB
/
pr.yml
File metadata and controls
69 lines (58 loc) · 1.93 KB
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
name: Build Automation
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
jobs:
maven:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check for non-site changes
id: filter
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE=${{ github.event.pull_request.base.sha }}
HEAD=${{ github.event.pull_request.head.sha }}
else
BASE=${{ github.event.before }}
HEAD=${{ github.sha }}
fi
CHANGED=$(git diff --name-only "$BASE" "$HEAD" -- . ':!site/' ':!examples/' | head -1)
if [ -n "$CHANGED" ]; then
echo "run=true" >> "$GITHUB_OUTPUT"
else
echo "run=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-java@v4
if: steps.filter.outputs.run == 'true'
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Maven tests
if: steps.filter.outputs.run == 'true'
run: mvn -T 1C -Djava.awt.headless=true -Dmaven.test.redirectTestOutputToFile=true --fail-at-end --batch-mode org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report install
- name: Codecov
if: steps.filter.outputs.run == 'true'
uses: codecov/codecov-action@v5
site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP Action
uses: shivammathur/setup-php@2.24.0
with:
php-version: '5.6'
tools: composer
- name: Prepare upload
run: ./prepare-upload.sh
- name: Perform upload
run: 'curl --fail -vk https://jmeter-plugins.org/unzip.php -F "zipfile=@upload/site.zip" -H "Authorization: Bearer ${{ secrets.UPLOAD_TOKEN }}"'
if: github.ref == 'refs/heads/master'