Skip to content

Collection of minor improvements #571

Collection of minor improvements

Collection of minor improvements #571

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build
on:
push:
branches: [master]
pull_request:
branches: [master, staging]
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the UI Docker image
run: docker build ui/ -t bcollazo/catanatron-react-ui:latest
- name: Build the Server Docker image
run: docker build . -f Dockerfile.web -t bcollazo/catanatron-server:latest
# - name: Build the Paperspace Docker image
# run: docker build . -f Dockerfile.paperspace -t bcollazo/paperspace-rl
build-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r all-requirements.txt
pip install -e catanatron_experimental
- name: Test dependency
run: |
python -c "from catanatron_experimental import *"
- name: Lint with black
run: |
black catanatron_core --check
black catanatron_gym --check
black catanatron_server --check
black catanatron_experimental --check
- name: Run sample catanatron-play
run: |
catanatron-play --players=R,W,F,AB:2 --num=2
- name: Test with pytest
run: |
coverage run --source=catanatron -m pytest tests/
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
build-gym:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -e catanatron_core
pip install -e catanatron_gym
- name: Inline test
run: |
python -c "import gymnasium as gym; env = gym.make('catanatron_gym:catanatron-v0')"
build-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
working-directory: ./ui
- run: npm run build
working-directory: ./ui