kopia lustrzana https://github.com/longclawshop/longclaw
57 wiersze
1.3 KiB
YAML
57 wiersze
1.3 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
|
|
test-python:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python: ["3.7", "3.8", "3.9"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install NPM and dependencies
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '12.x'
|
|
- name: Build client
|
|
run: |
|
|
npm install --prefix ./longclaw/client
|
|
npm run build --prefix ./longclaw/client
|
|
- name: Upload client
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: client
|
|
path: ./longclaw/core/static/core/js
|
|
|
|
- uses: actions/checkout@v3
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install tox tox-gh-actions
|
|
- name: Download client
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: client
|
|
path: ./longclaw/core/static/core/js
|
|
- name: Test with tox
|
|
run: tox
|