Skip to content

[ADD] name-non-ascii: Prevents file or directory names with ASCII characters #742

[ADD] name-non-ascii: Prevents file or directory names with ASCII characters

[ADD] name-non-ascii: Prevents file or directory names with ASCII characters #742

Workflow file for this run

name: build
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
env:
CACHE_VERSION: 1
PRE_COMMIT_CACHE: ~/.cache/pre-commit
jobs:
deployv:
runs-on: ubuntu-latest
container:
image: quay.io/vauxoo/dockerv:latest
options: --user root
name: docker vauxoo light image
env:
PIP_CACHE_DIR: "/root/.cache/pip"
PRE_COMMIT_HOME: "/root/.cache/pre-commit"
steps:
- uses: actions/[email protected]
- name: Upgrade pre-commit-vauxoo to the latest version (w/o update dependencies if not needed)
run: >-
pip3 install --ignore-installed -U . &&
pip3 install --force-reinstall --no-deps .
- name: Run pre-commit-vauxoo
run: pre-commit-vauxoo
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-13]
tox_env: ['py']
include:
- python: '3.12'
os: ubuntu-latest
tox_env: 'lint'
- python: '3.12'
os: ubuntu-latest
tox_env: 'docs'
- python: '3.12'
os: ubuntu-latest
tox_env: 'build'
# macos-14 AKA macos-latest has switched to being an ARM runner, only supporting newer versions of Python
# https://github.com/actions/setup-python/issues/825#issuecomment-2096792396
- python: '3.12'
os: macos-latest
tox_env: 'py'
steps:
- name: Set git to not change EoL
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
- name: Cache pre-commit packages
id: cache-pre-commit
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python }}-pre-commit
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
cache: 'pip'
- name: install dependencies
run: |
python -mpip install --progress-bar=off -r test-requirements.txt
# virtualenv --version
pip --version
# tox --version
pip list --format=freeze
- name: install apk packages
if: runner.os == 'Linux'
run: |
sudo apt update -qq
sudo apt install -y libecpg-dev # Required for vx-check-deactivate hook
- name: Test == windows
if: runner.os == 'Windows'
env:
TOXPYTHON: '${{ matrix.toxpython }}'
run: |
[System.Environment]::SetEnvironmentVariable('PATH',$env:Path + ";" + $env:PGBIN)
ecpg --version
tox -e ${{ matrix.tox_env }} -v
- name: Test != Windows
if: runner.os != 'Windows'
env:
TOXPYTHON: '${{ matrix.toxpython }}'
run: |
tox -e ${{ matrix.tox_env }} -v
# TODO: Publish package only for signed tags
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && contains(matrix.tox_env, 'build')
run: |
ls -lah dist/*
python -m twine upload --verbose -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --repository-url https://upload.pypi.org/legacy/ dist/*
sleep 300
curl -X POST -F token=${{ secrets.TRIGGER_TOKEN_DOCKERV }} -F ref=master https://git.vauxoo.com/api/v4/projects/443/trigger/pipeline
# TODO: Add GITHUB_RUN_ID.GITHUB_RUN_ATTEMPT.GITHUB_RUN_NUMBER to bumpversion to avoid duplicating upload versions or even the git sha
# For now, feel free to uncomment this line of code to test things related to upload to pypi (test)
# - name: TestPyPI publish package
# if: runner.os == 'Linux' && startsWith(matrix.tox_env, 'py39-cover')
# run: >-
# python -m twine upload --verbose -u __token__ -p ${{ secrets.PYPI_TEST_API_TOKEN }} \
# --repository-url https://test.pypi.org/legacy/ dist/* || true
- name: codecov
if: startsWith(matrix.tox_env, 'py') # only coveralls in python tests
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false # TODO: Set true after fix token for win&macosx
verbose: true