forked from lnbits/lnbits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # lnbits/core/static/favicon.ico # lnbits/core/templates/admin/index.html # lnbits/static/bundle.min.css # lnbits/templates/base.html
- Loading branch information
Showing
160 changed files
with
14,509 additions
and
4,311 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file, utf-8 charset | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[/lnbits/static/vendor/*] | ||
end_of_line = unset | ||
insert_final_newline = unset | ||
trim_trailing_whitespace = unset |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: prepare | ||
|
||
inputs: | ||
python-version: | ||
description: "Python Version" | ||
required: true | ||
default: "3.9" | ||
poetry-version: | ||
description: "Poetry Version" | ||
default: "1.5.1" | ||
node-version: | ||
description: "Node Version" | ||
default: "18.x" | ||
npm: | ||
description: "use npm" | ||
default: false | ||
type: boolean | ||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
# cache poetry install via pip | ||
cache: "pip" | ||
|
||
- name: Set up Poetry ${{ inputs.poetry-version }} | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ inputs.poetry-version }} | ||
|
||
- name: Setup a local virtual environment (if no poetry.toml file) | ||
shell: bash | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install the project dependencies | ||
shell: bash | ||
run: poetry install | ||
|
||
- name: Use Node.js ${{ inputs.node-version }} | ||
if: ${{ (inputs.npm == 'true') }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- uses: actions/cache@v3 | ||
if: ${{ (inputs.npm == 'true') }} | ||
name: Define a cache for the npm based on the dependencies lock file | ||
with: | ||
path: ./node_modules | ||
key: npm-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install npm packages | ||
if: ${{ (inputs.npm == 'true') }} | ||
shell: bash | ||
run: npm install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: LNbits CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
|
||
|
||
jobs: | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
|
||
tests: | ||
needs: [ lint ] | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10"] | ||
db-url: ["", "postgres://lnbits:lnbits@0.0.0.0:5432/lnbits"] | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
migrations: | ||
needs: [ lint ] | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
make: test-migration | ||
db-name: migration | ||
|
||
openapi: | ||
needs: [ lint ] | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: openapi | ||
|
||
# docker: | ||
# uses: ./.github/workflows/docker.yml | ||
|
||
regtest: | ||
needs: [ lint ] | ||
uses: ./.github/workflows/regtest.yml | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
backend-wallet-class: ["LndRestWallet", "LndWallet", "CoreLightningWallet", "CoreLightningRestWallet", "LNbitsWallet", "EclairWallet"] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
backend-wallet-class: ${{ matrix.backend-wallet-class }} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: docker | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: false | ||
tags: lnbitsdocker/lnbits-legend:latest | ||
cache-from: type=registry,ref=lnbitsdocker/lnbits-legend:latest | ||
cache-to: type=inline |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: lint | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
black: | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: checkblack | ||
ruff: | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: checkruff | ||
mypy: | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: mypy | ||
pyright: | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: pyright | ||
npm: true | ||
prettier: | ||
uses: ./.github/workflows/make.yml | ||
with: | ||
make: checkprettier | ||
npm: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: make | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
make: | ||
description: "make command that is run" | ||
required: true | ||
type: string | ||
npm: | ||
description: "use npm install" | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
make: | ||
name: ${{ inputs.make }} (${{ matrix.python-version }}) | ||
strategy: | ||
matrix: | ||
os-version: ["ubuntu-latest"] | ||
python-version: ["3.9", "3.10"] | ||
node-version: ["18.x"] | ||
runs-on: ${{ matrix.os-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/prepare | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
node-version: ${{ matrix.node-version }} | ||
npm: ${{ inputs.npm }} | ||
- run: make ${{ inputs.make }} |
Oops, something went wrong.