diff --git a/.github/workflows/separate_tests.yml b/.github/workflows/separate_tests.yml new file mode 100644 index 00000000..e3c40aa0 --- /dev/null +++ b/.github/workflows/separate_tests.yml @@ -0,0 +1,78 @@ +name: compatibility + +on: push + +jobs: + poetry: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.10.4" ] + poetry-version: [ "1.5.1" ] + db-url: [""] + mint-branch: [main] + wallet-branch: ['tests/separate_mint_wallet' ] + steps: + - name: Checkout mint branch + uses: actions/checkout@v4 + with: + ref: ${{ matrix.mint-branch}} + path: mint + submodules: recursive + token: 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 + - name: Checkout wallet branch + uses: actions/checkout@v4 + with: + ref: ${{ matrix.wallet-branch}} + path: wallet + submodules: recursive + token: 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 + - name: Set up Poetry ${{ matrix.poetry-version }} + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "poetry" + - name: Install dependencies mint + run: | + poetry install --extras pgsql + shell: bash + working-directory: mint + - name: Install dependencies wallet + run: | + poetry install --extras pgsql + shell: bash + working-directory: wallet + - name: Mint tests + env: + LIGHTNING: false + WALLET_NAME: test_wallet + MINT_HOST: localhost + MINT_PORT: 3337 + MINT_DATABASE: ${{ matrix.db-url }} + MINT_PRIVATE_KEY: "TEST_PRIVATE_KEY" + TOR: false + run: | + poetry run pytest tests --cov-report xml --cov cashu + working-directory: mint + - name: Wallet tests + env: + LIGHTNING: false + WALLET_NAME: test_wallet + MINT_HOST: localhost + MINT_PORT: 3337 + MINT_DATABASE: ${{ matrix.db-url }} + MINT_PRIVATE_KEY: "TEST_PRIVATE_KEY" + TOR: false + run: | + poetry run mint + poetry run pytest tests/wallet --cov-report xml --cov cashu + poetry run pytest tests/common --cov-report xml --cov cashu + working-directory: wallet + + +