fix prunings #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI linter and unit tests | |
on: [push] | |
permissions: | |
contents: read | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install locales package | |
run: sudo apt-get update && sudo apt-get install -y locales | |
- name: Generate and set locale | |
run: | | |
sudo locale-gen fr_FR.UTF-8 | |
echo "LC_ALL=fr_FR.UTF-8" | sudo tee -a /etc/environment | |
echo "LANG=fr_FR.UTF-8" | sudo tee -a /etc/environment | |
source /etc/environment | |
- name: Cache Python environment | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('ci_requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r ci_requirements.txt | |
- name: Run flake8 | |
run: flake8 . | |
- name: Run unittests | |
run: python -m unittest discover scraping |