Skip to content

Swap (found) and (building) variables in 7A ulocate documentation #197

Swap (found) and (building) variables in 7A ulocate documentation

Swap (found) and (building) variables in 7A ulocate documentation #197

Workflow file for this run

name: Pre-deployment CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
# Use preinstalled PostgreSQL
- name: Start PostgreSQL on Ubuntu
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Setup DB
run: |
sudo -u postgres psql --command="CREATE USER mindcode PASSWORD 'mindcode'" --command="\du"
sudo -u postgres createdb --owner=mindcode mindcode_test
PGPASSWORD=mindcode psql --username=mindcode --host=localhost --list
- name: Confirm DB accessible
run: |
PGPASSWORD=mindcode psql --dbname postgresql://mindcode:@127.0.0.1:5432/mindcode_test --command "SELECT version()"
rm webapp/src/test/resources/application.properties
echo >> webapp/src/test/resources/application.properties "spring.datasource.url=jdbc:postgresql://localhost:5432/mindcode_test"
echo >> webapp/src/test/resources/application.properties "spring.datasource.username=mindcode"
echo >> webapp/src/test/resources/application.properties "spring.datasource.password=mindcode"
- name: Cache
uses: actions/cache@v3
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: ~/.m2
# An explicit key for restoring and saving the cache
key: maven-v1
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
# restore-keys: # optional
# The chunk size used to split up large files during upload, in bytes
# upload-chunk-size: # optional
- name: Build with Maven
run: mvn -B package --file pom.xml