MilesCranmer commited on
Commit
b1cf54d
1 Parent(s): c0cb51e

Add CI for dockerfile

Browse files
Files changed (2) hide show
  1. .github/workflows/CI_docker.yml +40 -0
  2. Dockerfile +4 -1
.github/workflows/CI_docker.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ paths:
8
+ - 'test/**'
9
+ - 'pysr/**'
10
+ - '.github/workflows/**'
11
+ - 'setup.py'
12
+ - 'Project.toml'
13
+ pull_request:
14
+ branches:
15
+ - '*'
16
+ paths:
17
+ - 'test/**'
18
+ - 'pysr/**'
19
+ - '.github/workflows/**'
20
+ - 'setup.py'
21
+ - 'Project.toml'
22
+
23
+ jobs:
24
+ test:
25
+ runs-on: ${{ matrix.os }}
26
+ defaults:
27
+ run:
28
+ shell: bash
29
+ strategy:
30
+ matrix:
31
+ julia-version: ['1.7.1']
32
+ python-version: ['3.9']
33
+ os: [ubuntu-latest]
34
+
35
+ steps:
36
+ - uses: actions/[email protected]
37
+ - name: Build docker
38
+ run: docker build -t pysr .
39
+ - name: Test docker
40
+ run: docker run --rm -it pysr 'python3 -m unittest test.test'
Dockerfile CHANGED
@@ -40,4 +40,7 @@ RUN pip3 install .
40
  # Install Julia pre-requisites:
41
  RUN python3 -c 'import pysr; pysr.install()'
42
 
43
- CMD ["bash"]
 
 
 
 
40
  # Install Julia pre-requisites:
41
  RUN python3 -c 'import pysr; pysr.install()'
42
 
43
+ # Add tests
44
+ ADD ./test/ /pysr/test/
45
+
46
+ CMD ["bash"]