Skip to content

19 technical implement lti connection for moodle #110

19 technical implement lti connection for moodle

19 technical implement lti connection for moodle #110

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
Tests:
name: Software Tests
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Setup timezone
uses: zcong1993/setup-timezone@master
with:
timezone: UTC
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.10.4
- name: Install Python dependencies
run: |
sudo apt install -y $(grep -o ^[^#][[:alnum:]-]* "packages.list")
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Create Database Tables
run: |
python db_setup.py
- name: Test with pytest
run: |
pytest --cov=. --cov-report term-missing
Style:
name: Code Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup timezone
uses: zcong1993/setup-timezone@master
with:
timezone: UTC
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install Python dependencies
run: |
sudo apt install -y $(grep -o ^[^#][[:alnum:]-]* "packages.list")
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Test with PyCodeStyle
run: |
pycodestyle .
Sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install tox and any other packages
run: pip install -r requirements.txt
- name: Create Database Tables
run: python db_setup.py
- name: Run tox
run: tox -e py
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}