From 930d5e1526bbe60339d2c8d65019e943133a09d6 Mon Sep 17 00:00:00 2001 From: ShootingStar91 Date: Sat, 31 Aug 2024 13:59:50 +0300 Subject: [PATCH] Add api test workflow --- .github/workflows/api-tests.yaml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/api-tests.yaml diff --git a/.github/workflows/api-tests.yaml b/.github/workflows/api-tests.yaml new file mode 100644 index 00000000..c8072be3 --- /dev/null +++ b/.github/workflows/api-tests.yaml @@ -0,0 +1,36 @@ +name: 'Api-tests' + +on: + pull_request: + types: [opened, reopened] + push: + branches: + - '**' + paths-ignore: + - '**/*.md' + - '.github/workflows/build.yaml' + +jobs: + api-tests: + name: 'Api tests' + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: 'Install root dependencies' + run: npm run setup + + - name: 'Start containers' + run: npm run start:anon -- -d && sleep 60 + - name: Run api-tests + run: npm run test:api + - name: Dump docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v2