fix(deps): update jsonwebtoken.version to v0.12.3 #2016
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
env: | |
REGISTRY_NAME: github.com | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java-version: [ 21 ] | |
go-version: ["1.21.1"] | |
os: [ubuntu-latest] | |
# https://github.com/actions/example-services/blob/master/.github/workflows/postgres-service.yml | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 123456 | |
POSTGRES_DB: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432/tcp | |
redis: | |
image: redis:7.2.1-alpine | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps port 6379 on service container to the host | |
- 6379:6379 | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run db migration | |
run: cd migration && go build -o migrate migration.go && ./migrate up | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 123456 | |
POSTGRES_DB: postgres | |
POSTGRES_SSLMODE: disable | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Unit Test with Gradle | |
# run: ./gradlew flywayMigrate && ./gradlew build | |
run: ./gradlew test | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: [ test ] | |
strategy: | |
matrix: | |
java-version: [ 21 ] | |
os: [ ubuntu-latest ] | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build with Gradle | |
run: ./gradlew build -x test | |
build-maven: | |
runs-on: ${{ matrix.os }} | |
needs: [ build ] | |
strategy: | |
matrix: | |
java-version: [ 21 ] | |
os: [ ubuntu-latest ] | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven | |
run: ./mvnw package -Dmaven.test.skip=true | |
build-docker: | |
runs-on: ubuntu-latest | |
needs: [ build, build-maven ] | |
steps: | |
- uses: actions/checkout@master | |
# Container build | |
- name: Build docker with gradle | |
id: build-docker-g | |
run: | | |
docker build . -t ${{ env.REGISTRY_NAME }}/damingerdai/hoteler-g:${{ github.sha }} -f Dockerfile | |
- name: Image digest for gradle | |
run: echo ${{ steps.build-docker-g.outputs.digest }} | |
- name: Build docker with maven | |
id: build-docker-m | |
run: | | |
docker build . -t ${{ env.REGISTRY_NAME }}/damingerdai/hoteler-m:${{ github.sha }} -f maven.Dockerfile | |
- name: Image digest for maven | |
run: echo ${{ steps.build-docker-m.outputs.digest }} | |
build-bazel: | |
runs-on: ${{ matrix.os }} | |
needs: [ build ] | |
strategy: | |
matrix: | |
java-version: [ 21 ] | |
os: [ ubuntu-latest ] | |
steps: | |
- uses: actions/[email protected] | |
- name: Mount bazel cache | |
uses: actions/cache@v3 | |
with: | |
path: "/home/runner/.cache/bazel" | |
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: Build with bazel | |
run: bazel build //:hoteler |