robosats/.github/workflows/django-test.yml
dependabot[bot] 9ae22c42a4
Bump actions/setup-python from 3 to 4 (#519)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-02 23:58:27 +00:00

59 lines
2.2 KiB
YAML

name: "Test: Coordinator"
on:
workflow_dispatch:
workflow_call:
push:
branches: [ "main" ]
paths: ["api", "chat", "control", "robosats"]
pull_request:
branches: [ "main" ]
paths: ["api", "chat", "control", "robosats"]
# concurrency:
# group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
DEVELOPMENT: 1
strategy:
max-parallel: 4
matrix:
python-version: ["3.10.9"]
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 'Install Python Dependencies'
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: 'Install LND gRPC Dependencies'
run: |
cd api/lightning
git clone https://github.com/googleapis/googleapis.git
curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lightning.proto
curl -o invoices.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/invoicesrpc/invoices.proto
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. invoices.proto
curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
python3 -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
sed -i 's/^import .*_pb2 as/from . \0/' router_pb2.py
sed -i 's/^import .*_pb2 as/from . \0/' invoices_pb2.py
sed -i 's/^import .*_pb2 as/from . \0/' router_pb2_grpc.py
sed -i 's/^import .*_pb2 as/from . \0/' lightning_pb2_grpc.py
sed -i 's/^import .*_pb2 as/from . \0/' invoices_pb2_grpc.py
- name: 'Create .env File'
run: |
mv .env-sample .env
- name: 'Tests'
run: |
python manage.py test