pip + virtualenv -> uv #1295
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
pip install 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 |