-
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (42 loc) · 1.83 KB
/
pull-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run Tests in Docker Container
run-name: ${{ github.actor }} is pulling containers
on:
push:
branches:
- '*'
jobs:
set-up-computing-environment:
runs-on: ubuntu-latest
steps:
# Step 0: Checkout
- name: Checkout repository
uses: actions/checkout@v4
# Step 1: Pull the Docker container from Docker Hub
- name: Pull Docker Container
run: docker pull kumiori3/numerix:stable-amd64
# Step 2: Check out the repository code within the container
- name: Run Docker Container & Test
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace kumiori3/numerix:stable-amd64 \
# sh -c "cd /workspace && ls -la && pip install . && python3 -c 'import irrevolutions' && cd src/irrevolutions/test/ && pytest -v ."
- name: Run Docker Container & Pytest Simple Script
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace kumiori3/numerix:stable-amd64 \
# sh -c "cd /workspace && ls -la && pip install . && python3 -c 'import irrevolutions' && cd src/irrevolutions/test/ && python3 -m pytest test_rayleigh.py"
- name: Run Docker Container & Run Simple Script
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace kumiori3/numerix:stable-amd64 \
sh -c "cd /workspace && ls -la && pip install . && python3 -c 'import irrevolutions' && cd src/irrevolutions/test/ && python3 test_rayleigh.py"
# - name: Install package
# run: |
# ls -la
# pip install .
# - name: Test import package
# run: |
# python3 -c "import irrevolutions" && echo "Imported successfully" || echo "Failed to import"
# - name: Test scripts
# run: |
# pytest -v tests/