Skip to content

Commit 4a902af

Browse files
committed
Add CI that tests building the docker images
1 parent 602f83d commit 4a902af

File tree

3 files changed

+61
-5
lines changed

3 files changed

+61
-5
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Build containers
3+
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
get_json_versions:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Fetch versions to work for images
13+
- uses: actions/checkout@v2
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.8
18+
- id: set-versions
19+
run: echo "::set-output name=versions::$(./get_json_versions.py)"
20+
21+
outputs:
22+
versions: ${{ steps.set-versions.outputs.versions }}
23+
24+
build_images:
25+
runs-on: ubuntu-latest
26+
needs: get_json_versions
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
ps-version: ${{ fromJson(needs.get_json_versions.outputs.versions) }}
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Build Docker image
34+
run: docker build images/${version}

.github/workflows/nose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,30 @@ jobs:
1616
run: pip install -r requirements.txt
1717
- name: Run tests
1818
run: nosetests
19+
20+
get_json_versions:
21+
runs-on: ubuntu-latest
22+
steps:
23+
# Fetch versions to work for images
24+
- uses: actions/checkout@v2
25+
- name: Set up Python 3.8
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: 3.8
29+
- id: set-versions
30+
run: echo "::set-output name=versions::$(./get_json_versions.py)"
31+
32+
outputs:
33+
versions: ${{ steps.set-versions.outputs.versions }}
34+
35+
build_images:
36+
runs-on: ubuntu-latest
37+
needs: get_json_versions
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
ps-version: ${{ fromJson(needs.get_json_versions.outputs.versions) }}
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Build Docker image
45+
run: docker build images/${version}

.github/workflows/publish.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ jobs:
4444
if: ${{ github.event_name == 'pull_request' }}
4545
working-directory: base
4646

47-
- name: Base Images > Docker Build & Push
48-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base != 'true' }}
49-
run: ./docker_tags.sh -p
50-
working-directory: base
51-
5247
- name: Base Images > Docker Build & Push
5348
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base == 'true' }}
5449
run: ./docker_tags.sh -p -f

0 commit comments

Comments
 (0)