Skip to content

Commit

Permalink
Merge pull request #849 from lehigh-university-libraries/issue-848
Browse files Browse the repository at this point in the history
CI integration tests
  • Loading branch information
mjordan authored Jan 17, 2025
2 parents 49853cb + a27cd47 commit 3c58532
Show file tree
Hide file tree
Showing 78 changed files with 205 additions and 138 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
CMD_BUILD: pyinstaller workbench --onefile --name workbench-macos
OUT_FILE_NAME: workbench-macos
ASSET_MIME: application/zip
- os: ubuntu-latest
- os: ubuntu-22.04
TARGET: linux
CMD_BUILD: pyinstaller workbench --onefile --name workbench-linux
OUT_FILE_NAME: workbench-linux
ASSET_MIME: application/zip
- os: ubuntu-24.04
TARGET: linux
CMD_BUILD: pyinstaller workbench --onefile --name workbench-linux
OUT_FILE_NAME: workbench-linux
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Run integration test

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout workbench
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Checkout isle-site-template
uses: actions/checkout@v4
with:
repository: Islandora-Devops/isle-site-template
path: isle-site-template

- name: Install mkcert
run: |-
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
- name: Start islandora-starter-site
working-directory: isle-site-template
run: ./tests/init-template-starter.sh
env:
ISLANDORA_TAG: main
ISLANDORA_STARTER_REF: "heads/main"
ISLANDORA_STARTER_OWNER: "Islandora-Devops"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py install
# disable media standalone URL
docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y
docker exec isle-site-template-drupal-dev-1 drush cr
- name: Run islandora_tests_hooks
run: python tests/islandora_tests_hooks.py

- name: Run islandora_tests_paged_content
run: python tests/islandora_tests_paged_content.py
env:
REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem

- name: Run islandora_tests
run: python tests/islandora_tests.py
3 changes: 1 addition & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
secure_ssl_only: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
content_type: invalid_content_type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
use_node_title_for_media: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
use_node_title_for_media: true
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/additional_files_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: create.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/additional_files_test/rollback.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: delete
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/additional_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/allow_missing_files_test
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/add_media.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: add_media
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: add_media.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
secure_ssl_only: false
2 changes: 1 addition & 1 deletion tests/assets/check_test/delete.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: delete
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: delete.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/google_sheet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0'
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/update.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: update
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: update.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/excel.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/commented_csvs_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/google_sheets.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/commented_csvs_test
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/raw_csv.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/commented_csvs_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_from_files_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create_from_files
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/create_from_files_test/files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
paged_content_from_directories: true
paged_content_page_model_tid: http://id.loc.gov/ontologies/bibframe/part
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/create_paged_content_from_directories_test/samplebooks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
paged_content_from_directories: true
paged_content_page_model_tid: http://id.loc.gov/ontologies/bibframe/part
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/create_paged_content_from_directories_test/samplebooks
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_paged_content_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/create_paged_content_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/create_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_with_field_templates_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/create_with_field_templates_test
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/csv_row_filters_test/csv_row_filters_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: csv_row_filters_test.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delete_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/delete_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delete_test/delete.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: delete
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/delete_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delimiter_test/create_tab.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/delimiter_test"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/execute_bootstrap_script_test/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
media_type: document
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/execute_post_action_entity_script_test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
import tempfile

temp_dir = tempfile.gettempdir()
temp_dir = "/tmp"
output_file_path = os.path.join(temp_dir, "execute_post_action_entity_script.dat")

http_response_body = sys.argv[3]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/geolocation_test/bad_geocoordinates.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_dir: tests/assets/geolocation_test/input_data
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/google_gid_test/gid_0.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0'
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/google_gid_test/gid_1867618389.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0'
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/google_gid_test/gid_390347846.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0'
Expand Down
Loading

0 comments on commit 3c58532

Please sign in to comment.