Skip to content

Commit

Permalink
Update Github Workflows
Browse files Browse the repository at this point in the history
* Run on Ubuntu 24.04 or 22.04 for tasks requiring e2e env
* Use actions/setup-java build-in cache
  • Loading branch information
Huulivoide committed Sep 5, 2024
1 parent cb678aa commit 2c9cee0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: 24.04
env:
TZ: Europe/Oslo
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
image:
# only build and push the image when it's a commit to master in Entur's repository
if: github.repository_owner == 'entur' && github.event_name == 'push'
runs-on: ubuntu-latest
runs-on: 24.04
needs: [ tests ]
env:
CONTAINER_REPO: docker.io/entur/tiamat
Expand All @@ -50,4 +50,4 @@ jobs:
- name: Build container image with Jib, push to container repo
run: |
image_date=`date +%Y-%m-%dT%H-%M`
mvn --batch-mode compile com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=latest,$image_date
mvn --batch-mode compile com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=latest,$image_date
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
push_to_registry:
needs: run_java_tests
name: Build & Push Docker image to Docker Hub
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
run_cypress_tests:
name: Run cypress e2e tests from Docker
# These must run on ubuntu 22.04 or older.
# The MS SQL server used by jore4-jore3-importer,
# does not run on Linux kernels newer than 6.6.x.
runs-on: ubuntu-22.04

steps:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/run-java-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
run-tests:
name: Run java tests
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand All @@ -26,13 +26,7 @@ jobs:
java-package: jdk
architecture: x64
distribution: temurin

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: maven

- name: Run tests and try building a package
run: |
Expand Down

0 comments on commit 2c9cee0

Please sign in to comment.