remodel application to clean up main loop #58
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| generate-output: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Generate a pack | |
| shell: bash | |
| run: | | |
| pip install -r pythonProject/requirements.txt | |
| # start server hosting the datapackage | |
| python -m http.server -d test & | |
| SERVER_PID=$! | |
| sleep .1 | |
| # initialize pack | |
| mkdir -p tmp/pack | |
| python pythonProject/builder.py --home tmp/pack --game "Adventure" --source http://localhost:8000/ --test | |
| # populate pack | |
| python pythonProject/builder.py --home tmp/pack | |
| # stop server | |
| kill $SERVER_PID | |
| # run pack-checker from within builder | |
| python pythonProject/builder.py --check --home tmp/pack | |
| - name: Validate pack | |
| uses: PopTracker/pack-checker-action@v1 | |
| with: | |
| pack: tmp/pack | |
| strict: true |