Handle add after purge #170
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
# GitHub Workflow for CI | |
name: Test P4Transfer | |
on: | |
push: | |
paths: | |
- '**.py' | |
pull_request: | |
branches: [ $default-branch ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 | |
# Specific version of p4python - for ease of installation with static libs | |
pip install ruamel.yaml requests p4python | |
# Normally one would run the following | |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Now get latest tested version of p4d and put in the path | |
curl -L http://ftp.perforce.com/perforce/r21.1/bin.linux26x86_64/p4d -o $GITHUB_WORKSPACE/p4d | |
chmod +x $GITHUB_WORKSPACE/p4d | |
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH | |
- name: Lint with flake8 - enable when we reduce warnings appropriately! | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=160 --statistics | |
- name: Run tests | |
run: | | |
cd test | |
python TestP4Transfer.py | |
python TestFetchTransfer.py |