-
Notifications
You must be signed in to change notification settings - Fork 20
67 lines (65 loc) · 2.4 KB
/
deployment-tests.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
56
57
58
59
60
61
62
63
64
65
66
67
name: Deployment Tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
docker-builds:
if: github.event.schedule && github.repository == 'MatterMiners/tardis'
runs-on: ubuntu-latest
strategy:
matrix:
os_container: ['centos7', 'rockylinux8', 'rockylinux9', 'ubuntu20_04', 'ubuntu22_04']
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
file: containers/cobald-tardis-deployment-test-env/Dockerfile.${{ matrix.os_container }}
tags: matterminers/cobald-tardis-deployment-test-env:${{ matrix.os_container }}
deployment-linux:
needs: docker-builds
if: always() && (needs.docker-builds.result == 'success' || needs.docker-builds.result == 'skipped')
# Needs to be commented when testing locally with act, since it is not yet supported.
# https://github.com/nektos/act/pull/629
runs-on: ubuntu-latest
strategy:
matrix:
os_container: ['centos7', 'rockylinux8', 'rockylinux9', 'ubuntu20_04', 'ubuntu22_04']
container: matterminers/cobald-tardis-deployment-test-env:${{ matrix.os_container }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies on ${{ matrix.os_container }}
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[contrib]
python3 -m pip install coverage codecov
- name: Test with unittest on ${{ matrix.os_container }}
run: |
export LANG=en_US.utf8
coverage run -m unittest -v
deployment-macos:
strategy:
matrix:
platform: ['macos-latest']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies on ${{ matrix.platform }}
run: |
export PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:$PATH
python3 -m pip install --upgrade pip
python3 -m pip install .[contrib]
python3 -m pip install coverage codecov
- name: Test with unittest on ${{ matrix.platform }}
run: |
coverage run -m unittest -v