Skip to content

0.3.0: updating actions #7

0.3.0: updating actions

0.3.0: updating actions #7

Workflow file for this run

name: PR Validation
on:
pull_request:
branches:
- main
jobs:
validation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Get version from main branch
id: get_version
run: |
VERSION=$(python -c "import importlib; print(importlib.import_module('src.libcrawler.version').__version__)")
echo "Version: $VERSION"
echo "$VERSION" > $GITHUB_ENV
- name: Check if branch exists for the current version
run: |
VERSION=v${{ steps.get_version.outputs.version }}
git ls-remote --heads origin refs/heads/$VERSION && exit 0 || (echo "Branch $VERSION does not exist" && exit 1)
- name: Run tests
run: python -m unittest discover -s src/tests
- name: Build and check distribution
run: python3 -m build sdist
- name: Install package and test entry point
run: |
pip install dist/*.tar.gz
crawl-docs --help