Bump org.thymeleaf.extras:thymeleaf-extras-springsecurity6 from 3.1.1.RELEASE to 3.1.2.RELEASE #76
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
# This is a basic workflow to help you get started with Actions | |
name: CI / CD Pipeline | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
#Test's job | |
tests: | |
name: Unit tests | |
#Run on Ubuntu using the latest version | |
runs-on: ubuntu-latest | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_DB: citience | |
POSTGRES_USER: citience | |
POSTGRES_PASSWORD: citience | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
#Job's steps | |
steps: | |
#Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it | |
- uses: actions/checkout@v1 | |
#Set up JDK 11 | |
- name: Set up JDK | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
#Set up Maven cache | |
- name: Cache Maven packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
#Run Tests | |
- name: Run Tests | |
run: mvn -B test | |
#Sonar's Job | |
sonar: | |
#Depends on test's job | |
needs: tests | |
name: SonarCloud analysis | |
#Run on Ubuntu using the latest version | |
runs-on: ubuntu-latest | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_DB: citience | |
POSTGRES_USER: citience | |
POSTGRES_PASSWORD: citience | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
#Job's steps | |
steps: | |
#Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it | |
- uses: actions/checkout@v1 | |
#Set up JDK 17 | |
- name: Set up JDK | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
#Set up SonarCloud cache | |
- name: Cache SonarCloud packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
#Set up Maven cache | |
- name: Cache Maven packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
#Analyze project with SonarCloud | |
- name: Analyze with SonarCloud | |
run: mvn -B verify sonar:sonar -Dsonar.projectKey=philkisters_citience | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
#Build's job | |
build: | |
#Depends on sonar's job | |
needs: sonar | |
name: Build | |
#Run on Ubuntu using the latest version | |
runs-on: ubuntu-latest | |
steps: | |
#Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it | |
- uses: actions/checkout@v1 | |
#Set up JDK 17 | |
- name: Set up JDK | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
#Set up Maven cache | |
- name: Cache Maven packages | |
#This action allows caching dependencies and build outputs to improve workflow execution time. | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
#Build the application using Maven | |
- name: Build with Maven | |
run: mvn -B package -DskipTests --file pom.xml | |
#Build the application using Maven | |
- name: Upload JAR | |
#This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete. | |
uses: actions/upload-artifact@v2 | |
with: | |
#Set artifact name | |
name: artifact | |
#From this path | |
path: target/backend-*.jar |