AM 1.16.0 + SS 0.22.0 #2
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: Archivematica RPM Packages Test | |
on: | |
pull_request: | |
paths: | |
- "rpms/EL9/archivematica/**" | |
- "rpms/EL9/archivematica-storage-service/**" | |
- "rpms/EL9-testing/**" | |
push: | |
branches: | |
- "stable/**" | |
- "qa/**" | |
paths: | |
- "rpms/EL9/archivematica/**" | |
- "rpms/EL9/archivematica-storage-service/**" | |
- "rpms/EL9-testing/**" | |
jobs: | |
build-am-rpm: | |
name: Build Archivematica RPM packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
make -C ${{ github.workspace }}/rpms/EL9/archivematica | |
- name: Save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archivematica-rpm | |
path: | | |
${{ github.workspace }}/rpms/EL9/archivematica/*.rpm | |
build-ss-rpm: | |
name: Build Storage Service RPM package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
make -C ${{ github.workspace }}/rpms/EL9/archivematica-storage-service | |
- name: Save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archivematica-storage-service-rpm | |
path: | | |
${{ github.workspace }}/rpms/EL9/archivematica-storage-service/*.rpm | |
create-rpm-repo: | |
name: Create RPM repository | |
runs-on: ubuntu-latest | |
needs: | |
- build-am-rpm | |
- build-ss-rpm | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Restore Archivematica packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: archivematica-rpm | |
path: | | |
${{ github.workspace }}/rpms/EL9/archivematica/ | |
- name: Restore Storage Service package | |
uses: actions/download-artifact@v4 | |
with: | |
name: archivematica-storage-service-rpm | |
path: | | |
${{ github.workspace }}/rpms/EL9/archivematica-storage-service | |
- name: Create repository | |
run: | | |
make -C ${{ github.workspace }}/rpms/EL9 createrepo | |
- name: Save package repository | |
uses: actions/upload-artifact@v4 | |
with: | |
name: repository-rpm | |
path: | | |
${{ github.workspace }}/rpms/EL9/_yum_repository | |
test-rpm: | |
name: Test RPM packages | |
needs: create-rpm-repo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Restore package repository | |
uses: actions/download-artifact@v4 | |
with: | |
name: repository-rpm | |
path: ${{ github.workspace }}/rpms/EL9/_yum_repository | |
- name: Install Vagrant | |
run: | | |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
sudo apt update && sudo apt install vagrant | |
- name: Install VirtualBox | |
run: | | |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list | |
sudo apt update && sudo apt install virtualbox-7.0 | |
- name: Install the vagrant-vbguest plugin | |
run: | | |
vagrant plugin install vagrant-vbguest | |
- name: Update vbox networks | |
run: | | |
sudo mkdir -p /etc/vbox/ | |
echo "* 192.168.33.0/24" | sudo tee -a /etc/vbox/networks.conf | |
- name: Start | |
run: | | |
vagrant up --no-provision | |
working-directory: ${{ github.workspace }}/rpms/EL9-testing | |
- name: Install Guest Additions build dependencies | |
run: | | |
vagrant ssh -c 'sudo yum update -y && sudo yum upgrade -y' | |
vagrant ssh -c 'sudo yum install -y epel-release yum-utils' | |
vagrant ssh -c 'sudo yum-config-manager --enable crb' | |
vagrant ssh -c 'sudo yum install -y kernel-devel' | |
working-directory: ${{ github.workspace }}/rpms/EL9-testing | |
- name: Stop | |
run: | | |
vagrant halt | |
working-directory: ${{ github.workspace }}/rpms/EL9-testing | |
- name: Start and provision | |
run: | | |
vagrant up | |
working-directory: ${{ github.workspace }}/rpms/EL9-testing | |
env: | |
PROVISION: yes | |
LOCAL_REPOSITORY: yes | |
- name: Test AM API - Get processing configurations | |
run: | | |
test $( \ | |
curl \ | |
--silent \ | |
--header 'Authorization: ApiKey admin:apikey' \ | |
--header 'Content-Type: application/json' \ | |
'http://192.168.33.2:81/api/processing-configuration/' \ | |
| jq -r '.processing_configurations == ["automated", "default"]' \ | |
) == true | |
- name: Test SS API - Get pipeline count | |
run: | | |
test $( \ | |
curl \ | |
--silent \ | |
--header 'Authorization: ApiKey admin:apikey' \ | |
--header 'Content-Type: application/json' \ | |
'http://192.168.33.2:8001/api/v2/pipeline/' \ | |
| jq -r '.meta.total_count == 1' \ | |
) == true |