[deps] Bump selenium from 4.22.0 to 4.23.0 (#132) #221
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: Build run and test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: commit | |
uses: prompt/actions-commit-hash@v3 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
- name: Install python dependencies | |
run: | | |
python3 -m pip install -r requirements.txt | |
- name: Build package | |
run: | | |
python3 -m build | |
- name: Retrieve version | |
id: wheel | |
run: | | |
echo "PACKAGE=$(find "dist/" -type f -name "*.whl")" >> $GITHUB_OUTPUT | |
echo "WHL=$(basename "$PACKAGE")" >> $GITHUB_OUTPUT | |
- name: Install package | |
run: | | |
python3 -m pip install ${{ steps.wheel.outputs.PACKAGE }} | |
- name: Run scrapper | |
run: | | |
jobscrapper --config jobscrapper/config.json --loglevel DEBUG | |
- name: Check if files exists | |
run: | | |
if [ -f jobs.xlsx ]; then | |
echo "jobs.xlsx exists." | |
else | |
echo "jobs.xlsx does not exist. Exiting with failure." >&2 | |
exit 1 | |
fi | |
cp jobs.xlsx results.xlsx | |
if [ -f debug.log ]; then | |
echo "debug.log exists." | |
else | |
echo "debug.log does not exist. Exiting with failure." >&2 | |
exit 1 | |
fi | |
ls -ll | |
ls -ll dist/ | |
- name: Verify output | |
run: | | |
if grep -q ERROR "debug.log"; then | |
echo "ERROR: Log is containing exception or error!" | |
exit 1 | |
else | |
echo "All good" | |
fi | |
- name: Run tests | |
run: | | |
python3 -m pytest \ | |
--html=report.html \ | |
--cov-config=.coveragerc \ | |
--cov-report term \ | |
--cov-report html \ | |
--cov=jobscrapper | |
- name: Move artifacts to single location | |
run: | | |
mv dist/*.whl . | |
mv dist/*.tar.gz . | |
- name: 'Upload results.xlsx' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Results excel (${{ steps.commit.outputs.short }}) | |
path: | | |
**/*.xlsx | |
- name: 'Upload whl package' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Wheel package (${{ steps.commit.outputs.short }}) | |
path: | | |
**/*.whl | |
- name: 'Upload source.tar.gz package' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Source package (${{ steps.commit.outputs.short }}) | |
path: | | |
**/*.tar.gz | |