[resoto][chore] Move to AGPLv3 License #1657
Workflow file for this run
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
name: Test and build (resotocore) | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
branches: | |
- main | |
paths: | |
- 'resotocore/**' | |
- '.github/**' | |
- 'requirements-all.txt' | |
pull_request: | |
paths: | |
- 'resotocore/**' | |
- '.github/**' | |
- 'requirements-all.txt' | |
jobs: | |
resotocore-test-and-build: | |
name: "Test and build (resotocore)" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./resotocore | |
services: | |
arangodb: | |
image: arangodb:3.8.8 | |
env: | |
ARANGO_NO_AUTH: 1 | |
ports: | |
- 8529:8529 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Restore dependency cache | |
uses: actions/cache@v3 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{runner.os}}-pip-${{hashFiles('./resotocore/pyproject.toml')}}-${{hashFiles('./resotocore/requirements-test.txt')}} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ../requirements-test.txt | |
pip install ../resotolib | |
- name: Run Tests | |
env: | |
RESOTOCORE_ANALYTICS_OPT_OUT: true | |
run: pytest | |
- name: Build Jupyter lite static assets | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-jupyterlite.txt | |
jupyter lite build --config jupyter_lite_config.json | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
- name: Publish distribution to PyPI | |
if: github.ref_type == 'tag' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_RESOTOCORE }} | |
packages_dir: ./resotocore/dist/ |