-
Notifications
You must be signed in to change notification settings - Fork 427
141 lines (136 loc) · 4.35 KB
/
check-pr.yaml
File metadata and controls
141 lines (136 loc) · 4.35 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Check PR
on:
pull_request:
concurrency:
group: check-pr-${{ github.ref }}
cancel-in-progress: true
jobs:
check-pr:
name: Check PR
runs-on: ubuntu-latest
outputs:
lang-changed: ${{ steps.filter.outputs.lang == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- uses: sbt/setup-sbt@v1
- name: Check PR
run: sbt -J-Xlog:gc*=debug:file=./gc.log --batch "scalafmtCheck;checkPR;completeQaseRun"
env:
QASE_ENABLE: true
QASE_RUN_NAME: checkPR
QASE_RUN_ID: 1
QASE_PROJECT_CODE: PR
QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }}
CHECKPR_RUN_ID: ${{ github.run_id }}
- uses: scacap/action-surefire-report@5609ce4db72c09db044803b344a8968fd1f315da
if: always()
with:
report_paths: '**/target/test-reports/*.xml'
create_check: false
check_name: 'Check PR'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
lang:
- 'lang/**'
- 'build.sbt'
- 'project/*'
- uses: actions/upload-artifact@v4
if: steps.filter.outputs.lang == 'true'
with:
name: file-compiler
path: lang/jvm/target/file-compiler.jar
- name: Save debug data
uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: ignore
name: debug-data
path: |
gc.log*
hs*.log
core*
compile-contracts:
name: Compile ${{ matrix.repo }}
runs-on: ubuntu-latest
needs: check-pr
if: needs.check-pr.outputs.lang-changed == 'true'
strategy:
matrix:
repo:
- waves-exchange/neutrino-contract
- waves-exchange/contracts
- waves-ducks-core/wavesducks-public
- swopfi/swopfi-smart-contracts
steps:
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: actions/download-artifact@v5
with:
name: file-compiler
- run: find -name "*.ride" -type f -exec java -jar file-compiler.jar {} +;
run-integration-tests:
name: Run integration tests
needs: check-pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- name: Run Integration Tests
run: sbt --batch "node-it/docker;node-it/test"
env:
RUN_ID: ${{ github.head_ref }}-${{ github.run_number }}-${{ github.run_attempt }}
- uses: scacap/action-surefire-report@5609ce4db72c09db044803b344a8968fd1f315da
if: always()
with:
report_paths: '**/target/test-reports/*.xml'
create_check: false
check_name: 'Run integration tests'
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: ignore
name: test-logs
path: |
node-it/target/logs/*/
publish-snapshots:
name: Publish snapshot packages
needs: check-pr
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'publish-snapshots')
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- uses: sbt/setup-sbt@v1
- run: sbt -Dproject.version=$(awk -F '[".]' '{print $3"."$4"."$5+1}' version.sbt)-$PR_NUMBER-SNAPSHOT --batch publish
env:
SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}