build(deps-dev): bump the minorandpatch group with 2 updates (#60) #139
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
name: LAPIS-SILO E2E Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
schedule: | |
# Don't run at minute 0 to avoid very busy times on GitHub Actions | |
- cron: '13 4 * * 1-5' | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: prepare pnpm | |
run: npm i -g pnpm | |
- name: pnpm i | |
run: pnpm i | |
- name: test | |
run: | | |
pnpm test 2>&1 | tee test_output.txt | |
test ${PIPESTATUS[0]} -eq 0 | |
env: | |
LAPIS_TAG: latest | |
SILO_TAG: latest | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-results | |
path: testsets/**/output | |
- name: Retrieve logs | |
if: failure() | |
run: pnpm dockerLogs | |
- name: Upload logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: logs | |
path: logs/ | |
- name: Retrieve test results | |
if: failure() && github.event_name == 'schedule' | |
id: test_results | |
run: | | |
echo "test_output<<EOF" >> $GITHUB_OUTPUT | |
# Removing ANSI escape codes, because they bother in GitHub comments | |
cat test_output.txt | sed -r 's/\x1B\[[0-9;]*[mGKH]//g' >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Notify failed build | |
uses: jayqi/failed-build-issue-action@v1 | |
if: failure() && github.event_name == 'schedule' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
title-template: Test Run Failure (Automatic Report) | |
body-template: | | |
The end-to-end tests failed on the following run: | |
Ref: ${{ github.ref }} | |
Sha: ${{ github.sha }} | |
Run number ${{ github.run_number }}, attempt ${{ github.run_attempt }} | |
${{ github.event.repository.url }}/actions/runs/${{ github.run_id }} | |
<details> | |
<summary>Expand to see test output</summary> | |
``` | |
${{ steps.test_results.outputs.test_output }} | |
``` | |
</details> | |
check-format: | |
name: Check format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm ci | |
- run: npm run check-format | |
check-types: | |
name: Check types | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm ci | |
- run: npm run check-types |