Skip to content

pip + virtualenv -> uv #1309

pip + virtualenv -> uv

pip + virtualenv -> uv #1309

Workflow file for this run

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@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: actions/cache@v4
with:
path: |
~/.cache/uv
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up virtualenv
run: |
uv venv env --python=python3.10
source env/bin/activate
python --version
uv pip install packaging setuptools
- 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: |
source env/bin/activate
make docker_build && make docker_up
- name: Cooldown to let the app start
run: sleep 10
- name: Run tests
run: |
source env/bin/activate
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@v4
with:
name: logs
path: ./logs