47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Compile
|
|
run-name: Compiling software (Ubuntu)
|
|
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
|
|
|
|
- name: Install Ruby and Bundler
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y ruby-full libsodium-dev libpq-dev
|
|
gem install bundler
|
|
|
|
- name: Create PostgreSQL database
|
|
run: |
|
|
-u postgres createuser -s postgres
|
|
createdb fgbot_db
|
|
|
|
- name: Install dependencies
|
|
run: bundle install
|
|
|
|
- name: Execute program
|
|
env:
|
|
BOT_TOKEN: ${{ secrets.TOKEN }}
|
|
TEST_SERVER_ID: ${{ secrets.SERVER_ID }}
|
|
DB_HOST: 127.0.0.1
|
|
DB_USER: postgres
|
|
DB_NAME: fgbot_db
|
|
run: bundle exec ruby main.rb |