Skip to content

Commit

Permalink
Run tests during build
Browse files Browse the repository at this point in the history
  • Loading branch information
angely-dev committed Aug 22, 2024
1 parent 94fca35 commit 4f06ac1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Start MySQL service
run: |
sudo systemctl start mysql.service
- name: Init database
run: |
mysql -uroot -proot < docker/freeradius-mysql/1-database.sql
mysql -uroot -proot < docker/freeradius-mysql/2-schema.sql
mysql -uroot -proot < docker/freeradius-mysql/3-setup.sql
- name: Add mydb alias for localhost (used by database.py)
run: |
echo "127.0.0.1 mydb" | sudo tee -a /etc/hosts
ping -c 3 mydb
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -30,3 +42,6 @@ jobs:
- name: Check static typing
run: |
mypy .
- name: Run tests
run: |
pytest -v --cov-report term --cov=. src/tests/

0 comments on commit 4f06ac1

Please sign in to comment.