-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.64 KB
/
backend_plugin_test.yml
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
name: Backend Plugin Testing
on:
pull_request:
branches:
- main
push:
jobs:
backend_plugins:
runs-on: ubuntu-latest
env:
PROD_ARCHIVESSPACE_VERSION: v3.3.1
REFID_SEED_FILE: 'example.csv'
services:
db:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: archivesspace
MYSQL_USER: as
MYSQL_PASSWORD: as123
ports:
- 3307:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout ArchivesSpace
uses: actions/checkout@v4
with:
ref: ${{ env.PROD_ARCHIVESSPACE_VERSION }}
repository: Smithsonian/archivesspace
- name: Checkout plugin
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Copy plugin to ArchivesSpace and add to config
run: |
cp -r ${{ github.workspace }}/${{ github.event.repository.name }} ${{ github.workspace }}/plugins
cd ./common/config/
touch config.rb
echo "AppConfig[:plugins] = ['${{ github.event.repository.name }}']" > config.rb
- uses: Smithsonian/caas-aspace-services/.github/actions/bootstrap@main
with:
backend: true
- name: Allow ArchivesSpace functions for app db user
env:
DB_PORT: "3307"
run: |
mysql --host 127.0.0.1 --port $DB_PORT -uroot -proot -e "SET GLOBAL log_bin_trust_function_creators = 1;"
- name: Run Backend plugin tests
run: |
./build/run backend:test -Dspec="../../plugins/${{ github.event.repository.name }}/backend"