Postgres migration fix and test #16
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: Test bats | |
concurrency: | |
group: test-bats-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["dev"] | |
paths: | |
- "home.admin/config.scripts/bonus.postgresql.sh" | |
pull_request: | |
branches: ["dev"] | |
paths: | |
- "home.admin/config.scripts/bonus.postgresql.sh" | |
jobs: | |
run-bats-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install bats | |
run: | | |
sudo apt install bats | |
- name: Install postgreql 15 | |
run: | | |
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
sudo apt update | |
sudo apt install -y postgresql-15 | |
- name: Run the bats tests | |
run: | | |
cd test | |
sudo bats ./bonus.postgresql.bats |