Skip to content

Update Bitnami images references #337

Update Bitnami images references

Update Bitnami images references #337

Workflow file for this run

name: End-to-end tests
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
e2e-tests:
runs-on: ubuntu-latest
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: gitjobs
PGPASSWORD: password
PGDATABASE: gitjobs
services:
postgres:
image: postgis/postgis:17-3.5
env:
POSTGRES_USER: gitjobs
POSTGRES_PASSWORD: password
POSTGRES_DB: gitjobs
ports:
- 5432:5432
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Rust environment
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.90.0
components: clippy, rustfmt
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('''**/Cargo.lock''') }}
- name: Set up Node.js environment
uses: actions/setup-node@v5
with:
node-version: '20'
- name: Initialize npm and install dependencies
run: |
npm init -y
npm install -D @playwright/test wait-on
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Install Tailwind CSS
run: |
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
sudo mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss
- name: Install tern
run: |
curl -sL https://github.com/jackc/tern/releases/download/v2.3.2/tern_2.3.2_linux_amd64.tar.gz -o tern.tar.gz
tar -xzf tern.tar.gz
sudo mv tern /usr/local/bin/
- name: Build server
run: cargo build --bin gitjobs-server
- name: Run database migrations
working-directory: database/migrations
env:
TERN_CONF: ${{ github.workspace }}/database/migrations/tern.conf
run: |
touch tern.conf
bash ./migrate.sh
- name: Insert test data
run: |
psql -f database/tests/data/e2e.sql
- name: Create Server Config File
run: |
cat <<EOF > config.testing.yml
db:
url: postgres://gitjobs:[email protected]:5432/gitjobs
email:
from_address: "[email protected]"
from_name: "Test"
smtp:
host: "127.0.0.1"
port: 2525
username: "test"
password: "password"
log:
format: "pretty"
server:
addr: "0.0.0.0:8080"
base_url: "http://127.0.0.1:8080"
cookie:
secure: false
login:
email: true
github: false
linuxfoundation: false
oauth2: {}
oidc: {}
EOF
- name: Start server and wait for it to be ready
uses: JarvusInnovations/background-action@v1
with:
run: ./target/debug/gitjobs-server --config-file config.testing.yml &
wait-on: http://localhost:8080
tail: true
log-output: "stdout,stderr"
log-output-if: true
- name: Run Playwright tests
run: npx playwright test --config tests/e2e/playwright.config.ts
env:
BASE_URL: http://127.0.0.1:8080