diff --git a/.gitea/workflows/compile.yml b/.gitea/workflows/compile.yml index 3851c30..16d282f 100644 --- a/.gitea/workflows/compile.yml +++ b/.gitea/workflows/compile.yml @@ -5,6 +5,20 @@ on: [push] jobs: Compile: runs-on: ubuntu-latest + + services: + postgres: + image: postgres:16 + env: + POSTGRES_DB: fgbot_db + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -12,7 +26,7 @@ jobs: - name: Install Ruby and Bundler run: | apt-get update - apt-get install -y ruby-full + apt-get install -y ruby-full libsodium-dev libpq-dev gem install bundler - name: Install dependencies @@ -22,4 +36,7 @@ jobs: env: BOT_TOKEN: ${{ secrets.TOKEN }} TEST_SERVER_ID: ${{ secrets.SERVER_ID }} + DB_HOST: postgres + DB_USER: postgres + DB_NAME: fgbot_db run: bundle exec ruby main.rb \ No newline at end of file