isle/.github/workflows/unittest.yml

83 lines
2.2 KiB
YAML
Raw Normal View History

2024-01-11 04:46:37 -05:00
name: Test
on: [push, pull_request]
jobs:
pytest-win:
2024-01-11 04:46:37 -05:00
name: 'Python Windows'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
2024-02-04 13:37:37 -05:00
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v3
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Download original island binares
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
- name: Cache original binaries
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
uses: actions/cache/save@v3
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Install python libraries
shell: bash
run: |
pip install pytest -r tools/requirements.txt
- name: Run python unit tests (Windows)
shell: bash
run: |
2024-02-04 13:37:37 -05:00
pytest tools/isledecomp --lego1=legobin/LEGO1.DLL
pytest-ubuntu:
2024-01-11 04:46:37 -05:00
name: 'Python Linux'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2024-02-04 13:37:37 -05:00
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v3
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Download original island binares
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
- name: Cache original binaries
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
uses: actions/cache/save@v3
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Install python libraries
shell: bash
run: |
pip install pytest -r tools/requirements.txt
- name: Run python unit tests (Ubuntu)
shell: bash
run: |
2024-02-04 13:37:37 -05:00
pytest tools/isledecomp --lego1=legobin/LEGO1.DLL