Files
alttpr-python/.github/actions/test/action.yml
Minnie A. Trethewey (Mike) ca40f87daa CI Changes
2024-05-30 14:19:54 -06:00

98 lines
2.5 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Test
description: Test app
inputs:
os-name:
required: true
description: OS to run on
python-version:
required: true
description: Python version to install
#########
# actions
#########
# actions/checkout@v4.1.4
# actions/download-artifact@v4.1.7
# actions/upload-artifact@v4.3.3
# coactions/setup-xvfb@v1.0.1
runs:
using: "composite"
steps:
# download pipline
- name: 🔽Download PipLine
shell: bash
run: |
echo "🔽Download PipLine"
- name: 🔽Download PipLine
uses: actions/download-artifact@v4.1.7
with:
name: pipline-test-${{ inputs.os-name }}-py${{ inputs.python-version }}
path: ./resources/user/meta/manifests
# run tests
- name: 🖥Test Base
shell: bash
run: |
echo "🖥Test Base"
- name: 🖥Test Base
shell: bash
run: |
mkdir -p ./failures
echo "" > ./failures/errors.txt
python -m pip install tqdm
python ./test/NewTestSuite.py
# - name: 🖥Test Mystery
# shell: bash
# run: |
# echo "🖥Test Mystery"
# if: contains(inputs.os-name, 'macos')
# - name: 🖥Test Mystery
# shell: bash
# run: |
# python ./test/MysteryTestSuite.py
# if: contains(inputs.os-name, 'macos')
# upload logs
- name: 🔼Upload Logs
shell: bash
run: |
echo "🔼Upload Logs"
- name: 🔼Upload Logs
uses: actions/upload-artifact@v4.3.3
with:
name: logs-${{ inputs.os-name }}-py${{ inputs.python-version }}
path: ./logs
if-no-files-found: ignore
# print failures
- name: 💬Print Failures
if: failure()
shell: bash
run: |
echo "💬Print Failures"
- name: Print Failures
if: failure()
shell: bash
run: |
ERR_STRING="$(cat ./failures/errors.txt)"
ERR_STRING="${ERR_STRING//'%'/'%25'}"
ERR_STRING="${ERR_STRING//$'\n'/' | '}"
ERR_STRING="${ERR_STRING//$'\r'/' | '}"
ERR_STRING="${ERR_STRING//$'\n'/'%0A'}"
ERR_STRING="${ERR_STRING//$'\r'/'%0D'}"
echo "::error ::$ERR_STRING"
# upload failures
- name: 🔼Upload Failures
if: failure()
shell: bash
run: |
echo "🔼Upload Failures"
- name: 🔼Upload Failures
if: failure()
uses: actions/upload-artifact@v4.3.3
with:
name: failures-${{ inputs.os-name }}-py${{ inputs.python-version }}
path: ./failures