ci: add link to ci job

This commit is contained in:
kyranjamie
2023-05-08 18:49:18 +02:00
committed by kyranjamie
parent db53c6d77b
commit c31df37427
3 changed files with 16 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
name: Ordinals API test
name: External API tests
on:
pull_request:
@@ -38,7 +38,10 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Run Playwright tests
run: yarn playwright test tests/specs/ordinals/ordinals.spec.ts
id: playwright
uses: mathiasvr/command-output@v2.0.0
with:
run: yarn playwright test --reporter=github tests/api
- name: Discord notification
if: failure()
@@ -46,4 +49,9 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ALERT_CHANNEL }}
uses: Ilshidur/action-discord@master
with:
args: "Something funky's up with the OrdAPI.xyz. Wallet team engineer to investigate. See `ordinals-checker.yml Github Action."
args: |
Something funky's up with the OrdAPI.xyz. Wallet team engineer to investigate. See `ordinals-checker.yml` Github Action.
[Failing test job](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
```bash
${{ steps.playwright.outputs.stdout }}
```

View File

@@ -1,7 +1,7 @@
import { defineConfig, devices } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
* See https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './tests',
@@ -13,7 +13,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [['html', { open: 'never' }]],
reporter: [[process.env.CI ? 'github' : 'list'], ['html', { open: 'never' }]],
use: {
trace: 'on-first-retry',
},

View File

@@ -4,12 +4,13 @@ import { fetchInscription } from '@app/query/bitcoin/ordinals/inscription.query'
import { getNumberOfInscriptionOnUtxo } from '@app/query/bitcoin/ordinals/ordinals-aware-utxo.query';
import { fetchData } from '@app/query/utils';
test.describe(getNumberOfInscriptionOnUtxo.name, () => {
test('should return 3 in case of 3 inscriptions', async () => {
test.describe('OrdAPI.xyz', () => {
test('should return 3 in case of 3 inscriptions', async ({}) => {
const resp = await getNumberOfInscriptionOnUtxo(
'aa24aecb0e60afa43b646c5a61fee76aebdbbf85b8f85a4aa429f9d0c52c9623',
0
);
test.expect(resp).toBe(3);
});