mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-16 21:40:24 +00:00
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: test
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
test:
|
|
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
python-version: [3.7, 3.8, 3.9, '3.10']
|
|
fail-fast: true
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
- name: setup python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: install deps
|
|
run: python -m pip install tox poetry tox-poetry
|
|
- name: test
|
|
run: tox -e test
|
|
- name: upload cov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: ./coverage.xml
|
|
fail_ci_if_error: true
|
|
verbose: true
|
|
|
|
test_npm:
|
|
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
python-version: [3.7, 3.8, 3.9, '3.10']
|
|
node: [ 12, 14, 16 ]
|
|
fail-fast: true
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
- name: setup python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: setup node ${{ matrix.node }} on ${{ matrix.os }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: install project
|
|
run: npm --omit=dev install
|
|
- name: test post install
|
|
run: node ./bin/install.js
|
|
- name: test run help
|
|
run: node ./bin/index.js -h
|
|
- name: test run lint
|
|
run: echo "<div>" | node ./bin/index.js
|
|
- name: test run check
|
|
run: echo "<div>" | node ./bin/index.js --check
|