fix CI
This commit is contained in:
+18
-24
@@ -112,47 +112,38 @@ jobs:
|
|||||||
name: RSpec
|
name: RSpec
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
container:
|
||||||
|
image: ruby:4.0.5-alpine
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:14
|
image: postgres:18
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_DB: docuseal_test
|
POSTGRES_DB: docuseal_test
|
||||||
ports: ["5432:5432"]
|
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd "pg_isready -U postgres -d docuseal_test"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install packages
|
||||||
|
run: apk add --no-cache build-base git libpq-dev yaml-dev nodejs yarn tar zstd gzip wget unzip vips leptonica chromium
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: 4.0.5
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 20.19.0
|
|
||||||
- name: Install Chrome
|
|
||||||
uses: browser-actions/setup-chrome@latest
|
|
||||||
with:
|
|
||||||
chrome-version: 125
|
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-musl-node-${{ hashFiles('**/yarn.lock') }}
|
||||||
- name: Cache gems
|
- name: Cache gems
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
key: ${{ runner.os }}-musl-gem-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gem-
|
${{ runner.os }}-musl-gem-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
RAILS_ENV: test
|
RAILS_ENV: test
|
||||||
@@ -161,17 +152,20 @@ jobs:
|
|||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
bundle install --jobs 4 --retry 4
|
bundle install --jobs 4 --retry 4
|
||||||
yarn install
|
yarn install
|
||||||
sudo apt-get update
|
wget -O pdfium-linux.zip "https://github.com/docusealco/pdfium-binaries/releases/download/20260813/pdfium-musl-$(uname -m).zip"
|
||||||
sudo apt-get install -y libvips liblept5
|
case "$(uname -m)" in
|
||||||
wget -O pdfium-linux.tgz "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/').tgz"
|
x86_64) echo "c5c7dde243ecb66ab0819c8193515ef38ad53549fe260f3c2dfd93ea56eda2e7 pdfium-linux.zip" ;;
|
||||||
sudo tar -xzf pdfium-linux.tgz --strip-components=1 -C /usr/lib lib/libpdfium.so
|
aarch64) echo "64c4483449b1b4dccc696ad0c5c96e0b7f74dcc57b4f23c676b7a70671b0bbb5 pdfium-linux.zip" ;;
|
||||||
rm -f pdfium-linux.tgz
|
esac | sha256sum -c -
|
||||||
|
unzip -q pdfium-linux.zip -d /tmp/pdfium-linux
|
||||||
|
cp /tmp/pdfium-linux/lib/libpdfium.so /usr/lib/libpdfium.so
|
||||||
|
rm -rf pdfium-linux.zip /tmp/pdfium-linux
|
||||||
- name: Run
|
- name: Run
|
||||||
env:
|
env:
|
||||||
RAILS_ENV: test
|
RAILS_ENV: test
|
||||||
NODE_ENV: test
|
NODE_ENV: test
|
||||||
COVERAGE: true
|
COVERAGE: true
|
||||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/docuseal_test
|
DATABASE_URL: postgres://postgres:postgres@postgres:5432/docuseal_test
|
||||||
run: |
|
run: |
|
||||||
bundle exec rake db:create
|
bundle exec rake db:create
|
||||||
bundle exec rake db:migrate
|
bundle exec rake db:migrate
|
||||||
|
|||||||
@@ -1153,9 +1153,10 @@ RSpec.describe 'Signing Form' do
|
|||||||
click_on 'next'
|
click_on 'next'
|
||||||
draw_canvas
|
draw_canvas
|
||||||
|
|
||||||
expect do
|
click_on 'Sign and Complete'
|
||||||
click_on 'Sign and Complete'
|
|
||||||
end.to change(ProcessSubmitterCompletionJob.jobs, :size).by(1)
|
expect(page).to have_content('Document has been signed!')
|
||||||
|
expect(ProcessSubmitterCompletionJob.jobs.size).to eq(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user