Skip to content

Commit

Permalink
Try to re-add automated tests to github actions (#17)
Browse files Browse the repository at this point in the history
The recent fix to multiprocessing might or might not make tests run
properly here.
  • Loading branch information
RedTachyon authored Feb 9, 2024
1 parent 709a206 commit cc1d45c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build
on: [pull_request, push]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
build-all:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- run: |
docker build -f bin/all-py.Dockerfile \
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
--tag cogment_lab-all-docker .
- name: Run tests
run: docker run cogment_lab-all-docker pytest tests/*
2 changes: 1 addition & 1 deletion bin/all-py.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN apt-get -y update \
COPY . /usr/local/cogment_lab/
WORKDIR /usr/local/cogment_lab/

RUN pip install -r requirements.txt --no-cache-dir
RUN pip install --upgrade pip
RUN pip install .[all] --no-cache-dir

ENV PATH="/usr/local/bin:${PATH}"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ all = [
"torch",
"matplotlib",
"wandb>=0.13.9",
"hatch>=1.9.1",
"hatch>=1.7.0",
"ruff>=0.1.7",
"jupyter>=1.0.0",
"jupyterlab>=3.5.3",
Expand Down

0 comments on commit cc1d45c

Please sign in to comment.