-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (62 loc) · 1.74 KB
/
ubi8.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
68
69
name: github-UBI8
on:
pull_request:
paths-ignore:
- '**/*.rst'
- '**/*.md'
- 'doc/**'
types: [ opened, reopened, synchronize ]
permissions:
contents: none
# Cancels any in progress 'workflow' associated with this PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubi8-image:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: false
tags: |
ghcr.io/sandialabs/opencsp:latest
- name: Push image
run: |
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
docker push ghcr.io/sandialabs/opencsp:latest
ubi8-ci:
needs: ubi8-image
name: ubi8-ci
runs-on: [ubuntu-latest]
permissions:
packages: read
contents: read
container:
image: ghcr.io/sandialabs/opencsp:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: OpenCSP
- name: pytest-cov
working-directory: OpenCSP/opencsp
run: |
python3 -m pip install -r ../requirements.txt
export PYTHONPATH=$PWD/../
pytest --color=yes -rs -vv --cov=. --cov-report term --cov-config=.coveragerc