feat: add support for Documents #204
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
# This workflow builds and tests the project. | |
# It runs for every pull request. | |
# For testing currently uses the tests in Nillion repo. | |
name: Build | |
on: | |
push: | |
branches: "**" | |
pull_request: | |
branches: "**" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . .'[test]' .'[lint]' | |
- name: Lint with pylint | |
run: | | |
pylint nada_dsl/ | |
- name: Test with pytest | |
run: | | |
pytest | |
# Test that the compiled programs are compatible the Nillion backend. | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Checkout tools repo | |
uses: actions/checkout@v4 | |
with: | |
repository: NillionNetwork/nillion | |
path: nillion | |
token: ${{ secrets.NILLION_TOKEN }} | |
- name: Replace nillion's nada_dsl with this version | |
uses: actions/checkout@v4 | |
with: | |
path: nillion/nada-lang/nada_dsl | |
- name: Check that test-programs compile | |
run: | | |
pip install -U virtualenv | |
cd nillion && cargo build -p test-programs | |
- name: Run nada autotests | |
run: | | |
pip install nillion/nada-lang/nada_dsl | |
mkdir target | |
cd nillion | |
RUST_LOG=warn cargo run -p auto-tests |