-
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (57 loc) · 1.62 KB
/
main.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
name: CI
on:
push:
branches:
- master
pull_request:
branches_ignore:
- docs/*
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup black environment
run: conda create --quiet --name black pyflakes
- name: Check formatting with black
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate black
pip install black==23.3.0
black --check rse
- name: Check imports with pyflakes
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate black
pyflakes rse/client || true
pyflakes rse/*.py rse/main rse/utils
testing:
needs: formatting
runs-on: ubuntu-latest
env:
RSE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Setup testing environment
run: conda create --quiet --name testing pytest
- name: Test rse
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate testing
pip install -e .[all]
pytest -sv tests/*.py
/bin/bash tests/test_client.sh
build:
needs: testing
runs-on: ubuntu-latest
env:
CONTAINER: quay.io/vanessa/rse
steps:
- uses: actions/checkout@v4
- name: Build Docker Image
run: docker build -t "${CONTAINER}" .
- name: Tag and Preview Container
run: |
DOCKER_TAG=$(docker run "${CONTAINER}:latest" --version)
echo "Docker tag is: ${DOCKER_TAG}"
docker run ${CONTAINER} --help