Skip to content

ksef-utils Test

ksef-utils Test #3467

Workflow file for this run

name: ksef-utils Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 */3 * * *'
jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
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 python packages
run: |
pip install pip --upgrade
pip install -r requirements.txt
- name: Run mypy
run: |
pip install -r requirements-mypy.txt
mypy
- name: Run tests
run: |
curl https://ksef-test.mf.gov.pl
export KSEF_ENV="test"
export KSEF_TOKEN="AAA"
export KSEF_NIP="2222222222"
export KSEF_SIGN_CERT_PATH="/tmp/cert.pem"
export KSEF_SIGN_KEY_PATH="/tmp/privkey.pem"
export KSEF_SIGN_CA_PATH="/tmp/cert.pem"
export TESTS_MARKERS="(init_signed or e2e or current) and not ignore"
export KSEF_SUBJECT="/CN=John Doe/SN=Doe/GN=John/O=My Corp/C=PL/L=Lesser Voivodeship/serialNumber=NIP-${KSEF_NIP}/description=John Doe NIP-${KSEF_NIP}"
openssl req -x509 \
-nodes \
-subj "${KSEF_SUBJECT}" \
-days 365 \
-newkey rsa \
-keyout $KSEF_SIGN_KEY_PATH \
-out $KSEF_SIGN_CERT_PATH
./run_tests.sh
- name: Generate documentation
run: |
sphinx-build -M html docs docs_build