Skip to content

Update workflow

Update workflow #192

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pytest
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
environment: soru-sora
runs-on: ubuntu-latest
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
docker-images: false
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/cache
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: "7.0.5"
- name: Test with pytest
run: |
pytest