This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Implement plugins and extract conversion to PDF into its own plugin #233
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: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies for chromedp | |
run: sudo apt-get install -y libnspr4 libnss3 libexpat1 libfontconfig1 libuuid1 | |
- name: Start containers (PostgreSQL, MongoDB, Redis) | |
run: docker-compose -f "docker-compose-unittest.yml" up -d | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Setup .env file (PostgreSQL) | |
run: mv .gh-actions-env .env | |
- name: Build | |
run: make build | |
- name: Set PLUGINS_PATH env var | |
run: export PLUGINS_PATH=$(pwd)/plugins | |
- name: Test (PostgreSQL data store) | |
run: make alltest | |
- name: Change DATA_STORE to Mongo | |
run: sed -i 's/DATA_STORE=pg/DATA_STORE=mongo/g' .env | |
- name: Change DATABASE_URL to Mongo connection string | |
run: sed -i 's/DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable/DATABASE_URL=mongodb:\/\/localhost:27017/g' .env | |
- name: Remove full-text index DB | |
run: rm -rf sb.fts && rm -rf backend/sb.fts | |
- name: Clear all cache keys | |
run: docker exec core_redis_1 redis-cli FLUSHDB | |
- name: Test (Mongo data store) | |
run: make alltest |