Skip to content

Commit

Permalink
CLDR-11585 cache maven dependencies (#738)
Browse files Browse the repository at this point in the history
- cache maven dependencies for build speedup and reliability
- do not specify the maven central URL but let it default
- update some action versions
- do not run tests twice!

- also, add a comment explaining a line in the ansible-lint.yml
(from CLDR-13771 workaround ansible-lint failing (#729) )

(cherry picked from commit 880b495)
  • Loading branch information
srl295 authored and pedberg committed Oct 9, 2020
1 parent d13cd85 commit 27aa3a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
with:
lfs: false # not needed for this job, as we don’t currently do a Java build
- name: Lint Ansible Playbook
# the hash here is a specific version of that repo, since there is not a later commit.
uses: ansible/ansible-lint-action@6c8c14186662e43effbe39a678950896a46799ad
with:
targets: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.3.3
with:
lfs: true
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v1.4.2
with:
java-version: 1.8
- name: Cache local Maven repository
uses: actions/cache@v2.1.1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('tools/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -s .github/workflows/mvn-settings.xml -B package --file tools/pom.xml
run: mvn -s .github/workflows/mvn-settings.xml -B package --file tools/pom.xml -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test with maven
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/mvn-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ TODO: Remove this when ICU-21251 is completed.
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<!-- the 'central' repository is already defined by default. -->
<repository>
<id>github</id>
<name>GitHub unicode-org/cldr Apache Maven Packages</name>
Expand Down

0 comments on commit 27aa3a1

Please sign in to comment.