-
Notifications
You must be signed in to change notification settings - Fork 25
58 lines (56 loc) · 1.75 KB
/
test.yaml
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
name: test
on:
push:
branches: [main]
pull_request:
jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 60
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "wheel>=0.36.0"
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up configs
env:
TNS_BOT_ID: ${{ secrets.TNS_BOT_ID }}
TNS_BOT_NAME: ${{ secrets.TNS_BOT_NAME }}
TNS_API_KEY: ${{ secrets.TNS_API_KEY }}
run: |
cp docker-compose.defaults.yaml docker-compose.yaml
cat << EOF >> docker.yaml
tns:
url: https://www.wis-tns.org
bot_id: $TNS_BOT_ID
bot_name: $TNS_BOT_NAME
api_key: $TNS_API_KEY
EOF
- name: Build and spin up
run: make docker_build && make docker_up
- name: Cooldown to let the app start
run: sleep 10
- name: Run tests
run: make docker_test
- name: Collect Docker Logs
uses: jwalton/[email protected]
with:
images: 'skyportal/kowalski-ingester,skyportal/kowalski-api,kowalski-mongo'
dest: './logs'
- name: Upload logs
uses: actions/upload-artifact@v2
with:
name: logs
path: ./logs