Fix.test data #1484
Workflow file for this run
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
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
name: 'Test: k6' | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '.github/workflows/test_k6.yml' | |
- 'k6/**' | |
- 'services/.env.example' | |
- 'services/**' | |
- '!services/**.test.ts' | |
- '!services/**.spec.ts' | |
- '!**.md' | |
env: | |
k6TestsPath: 'k6/' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js version | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '${{ env.k6TestsPath }}/.node-version' | |
cache: 'npm' | |
cache-dependency-path: '${{ env.k6TestsPath }}/package-lock.json' | |
- name: Set ENV-variables for test-environment | |
run: | | |
cp ./services/.env.example services/.env | |
- name: Run Services with Docker | |
working-directory: ./services | |
run: | | |
docker --log-level 'warn' compose -f docker-compose.yml up -d --quiet-pull --wait --wait-timeout 300 | |
- name: Install k6 dependencies | |
working-directory: ${{ env.k6TestsPath }} | |
run: | | |
npm ci --omit=optional --no-fund --no-audit | |
- name: Lint k6 tests | |
working-directory: ${{ env.k6TestsPath }} | |
run: 'npm run lint' | |
- name: Download k6 | |
working-directory: ${{ env.k6TestsPath }} | |
run: | | |
curl https://github.com/grafana/k6/releases/download/v0.51.0/k6-v0.51.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 | |
- name: Run k6 tests | |
working-directory: ${{ env.k6TestsPath }} | |
run: | | |
npx dotenv -e ../services/.env -- ./k6 run tests/getProgramWithManyAttributes.js | |
- name: Docker logs | |
if: always() | |
uses: jwalton/gh-docker-logs@v2 |