Files
my-botty/.github/workflows/ci.yml

68 lines
1.8 KiB
YAML

name: Botty - CI
on:
pull_request:
push:
branches: [main, mine]
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Miniconda Python 3.10
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.10'
activate-environment: botty
channel-priority: strict
environment-file: environment.yml
use-only-tar-bz2: true
- name: Download test assets
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate botty
python -c "import utils.download_test_assets"
- name: Pytest
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate botty
python -c "import sys; print(sys.version)"
python -m pytest test/smoke_test.py test/nip/ test/game_stats_test.py test/closest_non_hud_test.py test/transmute/ -v -s
- name: Coverage
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate botty
coverage xml
build:
needs: test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Miniconda Python 3.10
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.10'
activate-environment: botty
channel-priority: strict
environment-file: environment.yml
use-only-tar-bz2: true
- name: Build exe
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate botty
python build.py --conda_path C:\Miniconda --random_name
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: botty-build
path: botty_v*/
retention-days: 7