Skip to content

build(deps): bump actions/download-artifact in /.github/workflows #64

build(deps): bump actions/download-artifact in /.github/workflows

build(deps): bump actions/download-artifact in /.github/workflows #64

# This workflow will test if this package can be used as a downstream dependency test (it is in fact a test for https://github.com/pypa/pip/issues/11952)
# It uses the Python Package GitHub Actions workflow.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# and https://www.youtube.com/watch?v=l6fV09z5XHk
name: ci-build-dowstream
on:
push:
branches:
- master # $default-branch only works in Workflows templates, not in Workflows, see https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
pull_request:
branches:
- master
jobs:
testdownstream:
name: Unit test downstream package depending on our package
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["*", "pypy-3.9"] # check the list of versions: https://github.com/actions/python-versions/releases and https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md -- note that "*" represents the latest stable version of Python
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: |
python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# The rest is managed by the pyproject.toml
- name: Echo current Python version
run: echo "${{ matrix.python-version }}"
# - name: Compile the Cython extension
# if: ${{ matrix.python-version != 'pypy-3.9' }} # ${{}} GitHub expression syntax, need to place the target python-version in single quotes (not double quotes!) so that it does not stop parsing the literal at dots, otherwise dots will truncate the string https://docs.github.com/en/actions/learn-github-actions/expressions
# run: |
# pip install --upgrade --config-setting="--install-option=--no-cython-compile" cython>=3.0.0b2
- name: Test installing and unit testing pyFileFixity from git
# Make sure to have a .gitattributes file with `* -text` without quotes inside, to prevent automatic crlf line endings conversions/normalization by git.
# FIXME: Need to use the @ form once issue https://github.com/pypa/pip/issues/11951 is fixed, as supplying extras to an egg fragment is deprecated and will be removed in pip v25.
run: |
pip install --upgrade --editable git+https://github.com/lrq3000/pyFileFixity.git#egg=pyFileFixity[test] --verbose
pytest src/pyfilefixity
- name: Get files contents (if failure)
# See: https://stackoverflow.com/questions/60679609/github-action-to-simply-cat-a-file-to-an-output
# https://www.howtohaven.com/system/view-binary-file-on-windows.shtml
id: vars
if: failure() # || success()
run: |
format-hex src/pyfilefixity/pyFileFixity/tests/out/d_dir.csv
format-hex src/pyfilefixity/pyFileFixity/tests/results/test_rfigc_test_dir.csv
shell: pwsh