-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (69 loc) · 2.57 KB
/
_test-integration.yml
File metadata and controls
77 lines (69 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# Run integration tests.
#
name: Integration Tests - All Dependencies
on:
workflow_call:
workflow_dispatch:
env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_LOG_LEVEL: DEBUG
jobs:
integration-tests:
name: Run Integration Tests
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os:
- "ubuntu-24.04"
- "macos-latest"
ruby:
- "3.2"
- "4.0"
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install Ghostscript and ImageMagick on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt-get install -y ghostscript imagemagick
- name: Install Ghostscript and ImageMagick on macOS
if: runner.os == 'macOS'
run: brew install ghostscript imagemagick
- name: Change ImageMagick security policy on Ubuntu
if: runner.os == 'Linux'
run: |
DQT='"'
SRC="rights=${DQT}none${DQT} pattern=${DQT}PDF${DQT}"
RPL="rights=${DQT}read|write${DQT} pattern=${DQT}PDF${DQT}"
sudo sed -i "s/$SRC/$RPL/" /etc/ImageMagick-6/policy.xml
- name: Run Rspec for integration tests
run: |
bundle exec rake integration
- name: Notify Slack Action on Failure
uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'main' }}
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "[Ruby] Integration test '{workflow}' is failing"
env:
SLACK_WEBHOOK_URL: ${{ secrets.PRODUCTION_ISSUES_SLACK_HOOK_URL }}