Skip to content

Commit 9bbfb18

Browse files
committed
Extract tests from workflow
1 parent c5aaff5 commit 9bbfb18

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,7 @@ jobs:
4444
steps:
4545
- uses: actions/checkout@v1
4646
- run: ./make_layer.sh ${{ matrix.runtime }}
47-
48-
- run: |
49-
mkdir opt
50-
cd opt
51-
unzip ../layer_diffoscope_${{ matrix.runtime }}.zip
52-
ldd bin/* || true
53-
ldd lib/* || true
54-
cd ..
55-
ls -l
56-
docker run -e DOCKER_LAMBDA_DEBUG=1 --rm -v "$PWD":/var/task:ro,delegated -v "$PWD"/opt/:/opt:ro,delegated lambci/lambda:${{ matrix.runtime }} tests.run 2> /tmp/test_results
57-
cat /tmp/test_results
58-
grep '^OK$' /tmp/test_results
59-
47+
- run: ./run_tests.sh ${{ matrix.runtime }}
6048
- name: Load Release URL File from release job
6149
if: startsWith(github.ref, 'v')
6250
uses: actions/download-artifact@v1

run_tests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
RUNTIME=${1:-python3.6}
3+
4+
rm -r opt
5+
mkdir opt
6+
cd opt
7+
unzip ../layer_diffoscope_$RUNTIME.zip
8+
ldd bin/* || true
9+
ldd lib/* || true
10+
cd ..
11+
ls -l
12+
docker run -e DOCKER_LAMBDA_DEBUG=1 --rm -v "$PWD":/var/task:ro,delegated -v "$PWD"/opt/:/opt:ro,delegated lambci/lambda:$RUNTIME tests.run 2> /tmp/test_results
13+
cat /tmp/test_results
14+
grep '^OK$' /tmp/test_results

0 commit comments

Comments
 (0)