mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-15 11:56:23 +00:00
68c473561a
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/cache 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>
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: "Test: Coordinator"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths: ["api", "chat", "control", "robosats"]
|
|
pull_request_target:
|
|
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.11.6"] # , "3.12"]
|
|
|
|
services:
|
|
db:
|
|
image: postgres:14.2
|
|
env:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: example
|
|
ports:
|
|
- 5432:5432
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 'Set up Python ${{ matrix.python-version }}'
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: 'Cache pip dependencies'
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: 'Install Python Dependencies'
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: 'Install LND/CLN gRPC Dependencies'
|
|
run: bash ./scripts/generate_grpc.sh
|
|
|
|
- name: 'Create .env File'
|
|
run: |
|
|
mv .env-sample .env
|
|
|
|
- name: 'Wait for PostgreSQL to become ready'
|
|
run: |
|
|
sudo apt-get install -y postgresql-client
|
|
until pg_isready -h localhost -p 5432 -U postgres; do sleep 2; done
|
|
|
|
- name: 'Run tests with coverage'
|
|
run: |
|
|
pip install coverage
|
|
coverage run manage.py test
|
|
coverage report |