Skip to content

aggregated stats use oeh_lrt_aggregated because it is used in ui as well #561

aggregated stats use oeh_lrt_aggregated because it is used in ui as well

aggregated stats use oeh_lrt_aggregated because it is used in ui as well #561

Workflow file for this run

name: MetaQS push actions
on:
push:
env:
docker_repository: "docker.edu-sharing.com"
image_name: "/projects/wlo/edu_sharing-projects-wlo-metaqs-api"
jobs:
build-and-push-fastapi:
name: Build and Push FastAPI image to community edu hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: rlespinasse/github-slug-action@v4
- name: Log in to edu sharing
run: docker login ${{env.docker_repository}} -u ${{ secrets.DOCKER_EDU_HUB_REGISTRY_USERNAME }} -p ${{ secrets.DOCKER_EDU_HUB_REGISTRY_PASSWORD }}
- name: Build
run: docker build -t ${{env.docker_repository}}${{env.image_name}}:${{ env.GITHUB_REF_SLUG }} ./src
- name: Push
run: docker push ${{env.docker_repository}}${{env.image_name}}:${{ env.GITHUB_REF_SLUG }}
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
run_tests:
runs-on: ubuntu-latest
env:
DATABASE_URL: sqlite:///./metaqs-tests.sqlite
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip
pip install poetry
poetry export --without-hashes --dev -o requirements.txt
pip install -r requirements.txt
working-directory: src/
- name: Test with pytest
run: |
echo "----PYTHONPATH------"
PWD=$(pwd)
export PYTHONPATH=$PWD/src:$PWD/tests:$PYTHONPATH
echo "PYTHONPATH=$PYTHONPATH"
export "PYTEST_RUN_CONFIG=true"
pytest