Skip to content

CI

CI #141

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Every Sunday at 0:37 UTC.
- cron: "37 0 * * 0"
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run-tests:
runs-on: ${{ matrix.os }}
# If you trigger a new workflow while the previous one is running,
# this will cancel the previous one.
strategy:
# Use matrix strategy to run the tests on multiple Py versions on multiple OSs.
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
**/requirements*.txt
- name: Install the Dependencies
run: |
echo "Upgrading pip ...."
python -m pip install --upgrade pip
python3 -m pip install -r requirements.txt && pip install -r requirements-dev.txt
- name: Check Linter
run: |
make lint-check
- name: Run the tests & Generate coverage report
run: |
make test
locust -f src/locustfile.py \
--host https://currency-exchange.p.rapidapi.com/ \
--headless -u 1 -r 5 --run-time=5 --exit-code-on-error 1