2020-07-02 11:02:47 +02:00
name : Build & Test
on :
push :
branches : [ master ]
pull_request :
branches : [ master ]
jobs :
build :
runs-on : ubuntu-latest
2022-06-08 10:39:21 +02:00
timeout-minutes : 30
2020-07-02 11:02:47 +02:00
steps :
2022-12-29 10:22:10 +01:00
- uses : actions/checkout@v3
2020-07-02 11:02:47 +02:00
- name : Set up JDK 11
2022-12-29 10:22:10 +01:00
uses : actions/setup-java@v3
2020-07-02 11:02:47 +02:00
with :
java-version : 11
2022-12-29 10:22:10 +01:00
distribution : 'adopt'
2020-07-02 11:02:47 +02:00
- name : Cache Maven dependencies
2022-12-29 10:22:10 +01:00
uses : actions/cache@v3
2020-07-02 11:02:47 +02:00
with :
path : ~/.m2
key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys : ${{ runner.os }}-m2
- name : Configure OS settings
run : echo "fs.file-max = 1024000" | sudo tee -a /etc/sysctl.conf
2020-11-30 18:10:21 +01:00
# NB: we exclude external API tests from the CI, because we don't want our build to fail because a dependency is failing.
# This means we won't automatically catch changes in external APIs, but developers should regularly run the test suite locally so in practice it shouldn't be a problem.
2020-07-02 11:02:47 +02:00
- name : Build with Maven
2020-12-08 18:41:51 +01:00
run : mvn test-compile && mvn scoverage:report -DtagsToExclude=external-api
2020-07-21 13:05:51 +02:00
- name : Upload coverage to Codecov
2022-12-29 10:22:10 +01:00
uses : codecov/codecov-action@v3