Skip to content

Merge pull request #35 from statisticsnorway/dev-scraping #66

Merge pull request #35 from statisticsnorway/dev-scraping

Merge pull request #35 from statisticsnorway/dev-scraping #66

Workflow file for this run

# .github/workflows/app.yaml
name: PyTest
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v3
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
- name: Install system dependencies
run: |
# Install system-level dependencies (Linux example)
sudo apt-get update
sudo apt-get install -y build-essential python3-dev
- name: Create virtual environment
run: python -m venv venv
- name: Activate virtual environment
run: |
source venv/bin/activate
- name: Install dependencies
run: |
source venv/bin/activate
pip install --upgrade pip
pip install -r python/requirements.txt
pip install pytest
- name: Run unit tests with pytest
run: |
source venv/bin/activate
pytest python/tests