2024-05-01 18:20:51 +00:00
|
|
|
# This workflow will build HIRS, run system tests, and create artifacts consisting of ACA and Provisioner logs.
|
2024-06-07 10:28:25 +00:00
|
|
|
# Updated: 06/05/2024
|
2024-05-01 18:20:51 +00:00
|
|
|
#
|
2021-11-16 21:51:42 +00:00
|
|
|
name: HIRS System Tests
|
2024-05-01 18:20:51 +00:00
|
|
|
on:
|
2021-11-16 21:51:42 +00:00
|
|
|
push:
|
2023-06-23 14:52:49 +00:00
|
|
|
branches:
|
2024-05-01 18:20:51 +00:00
|
|
|
- '*v3*'
|
|
|
|
- 'main'
|
|
|
|
workflow_dispatch:
|
2021-11-16 21:51:42 +00:00
|
|
|
jobs:
|
|
|
|
DockerTests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
test-result: ${{ steps.set_outputs.outputs.test-result }}
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
steps:
|
2024-05-01 18:20:51 +00:00
|
|
|
- name: Checkout repository
|
2024-05-09 16:12:00 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-06-07 10:28:25 +00:00
|
|
|
- name: ACA TPM2 System Tests Setup
|
2024-05-01 18:20:51 +00:00
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# If on a forked repo, ensure that it has a new secret for the PAT
|
|
|
|
# and replace secrets.GITHUB_TOKEN with the secret in the fork
|
|
|
|
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
2024-06-07 10:28:25 +00:00
|
|
|
.ci/system-tests/setup_system_tests.sh ${GITHUB_REF#refs/heads/}
|
|
|
|
- name: ACA POLICY TEST 1 - Test ACA default policy
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 1
|
|
|
|
- name: ACA POLICY TEST 2 - Test EK cert Only Validation Policy without a EK Issuer Cert in the trust store
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 2
|
|
|
|
- name: ACA POLICY TEST 3 - Test EK Only Validation Policy
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 3
|
|
|
|
- name: ACA POLICY TEST 4 - Test PC Validation Policy with no PC
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 4
|
|
|
|
- name: ACA POLICY TEST 5 - Test FW and PC Validation Policy with no PC
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 5
|
|
|
|
- name: ACA POLICY TEST 6 - Test PC Validation Policy with valid PC with no Attribute Check
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 6
|
|
|
|
- name: ACA POLICY TEST 7 - Test PC Validation Policy with valid PC with Attribute Check
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 7
|
|
|
|
- name: ACA POLICY TEST 8 - Test PC with RIM Validation Policy with valid PC and RIM
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 8
|
2024-07-22 10:03:09 +00:00
|
|
|
- name: ACA POLICY TEST 9 - Test valid PC and RIM with PC only uploaded
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-07-22 10:03:09 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 9
|
|
|
|
- name: ACA POLICY TEST 10 - Test valid PC and RIM with RIM only uploaded
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-07-22 10:03:09 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/aca_policy_tests.sh 10
|
2024-06-07 10:28:25 +00:00
|
|
|
# - name: All ACA Policy Tests 1-8
|
|
|
|
# continue-on-error: true
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# .ci/system-tests/tests/aca_policy_tests.sh
|
2024-06-07 17:27:08 +00:00
|
|
|
- name: ACA PLATFORM CERTIFICATE TEST 1 - Test a delta Platform Certificate that adds a new memory component
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/platform_cert_tests.sh 1
|
|
|
|
- name: ACA PLATFORM CERTIFICATE TEST 2 - Test a Platform Certificate that is missing a memory component
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/platform_cert_tests.sh 2
|
|
|
|
- name: ACA PLATFORM CERTIFICATE TEST 3 - Test a Delta Platform Certificate that has a wrong a memory component
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/platform_cert_tests.sh 3
|
|
|
|
# - name: All Platform Cert Tests 1-3
|
|
|
|
# continue-on-error: true
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# .ci/system-tests/tests/platform_cert_tests.sh
|
|
|
|
- name: ACA RIM TEST 1 - Test a RIM from an OEM and a Supplemental RIM from a VAR
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/rim_system_tests.sh 1
|
|
|
|
- name: ACA RIM TEST 2 - Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/rim_system_tests.sh 2
|
|
|
|
- name: ACA RIM TEST 3 - Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 17:27:08 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
.ci/system-tests/tests/rim_system_tests.sh 3
|
|
|
|
# - name: All RIM System Tests 1-3
|
|
|
|
# continue-on-error: true
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# .ci/system-tests/tests/rim_system_tests.sh
|
2024-06-07 10:28:25 +00:00
|
|
|
- name: Copy System Test Log files
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "*** Extracting ACA and Provisioner.Net logs ..."
|
|
|
|
docker exec hirs-aca1 bash -c "mkdir -p /HIRS/logs/aca/ && cp -arp /var/log/hirs/* /HIRS/logs/aca/"
|
|
|
|
docker exec hirs-provisioner1-tpm2 bash -c "mkdir -p /HIRS/logs/provisioner/ && cp -ap hirs*.log /HIRS/logs/provisioner/ && chmod -R 777 /HIRS/logs"
|
|
|
|
- name: Docker Compose Down
|
2024-07-25 17:33:16 +00:00
|
|
|
if: always()
|
2024-06-07 10:28:25 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "*** Exiting and removing Docker containers and network ..."
|
|
|
|
docker compose -f .ci/docker/docker-compose-system-test.yml down -v
|
2024-05-01 18:20:51 +00:00
|
|
|
- name: Archive System Test Log files
|
2024-07-25 18:25:35 +00:00
|
|
|
if: always()
|
2024-05-09 16:12:00 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-05-01 18:20:51 +00:00
|
|
|
with:
|
|
|
|
name: System_Test_Log_Files
|
|
|
|
path: logs/
|
|
|
|
if-no-files-found: ignore
|