From 0b22c41d55e986153cb1c42d671d643fb865defe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 26 Mar 2024 20:27:12 +0100 Subject: [PATCH] ci: run jmeter only if linting passes to save resources (#2366) also uses `prepare` action to initialize python env --- .github/workflows/ci.yml | 1 + .github/workflows/jmeter.yml | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53bcb1411..c5abcf23d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} jmeter: + needs: [ lint ] strategy: matrix: python-version: ["3.9"] diff --git a/.github/workflows/jmeter.yml b/.github/workflows/jmeter.yml index a736773a8..b14e56046 100644 --- a/.github/workflows/jmeter.yml +++ b/.github/workflows/jmeter.yml @@ -20,25 +20,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + - uses: ./.github/actions/prepare with: python-version: ${{ inputs.python-version }} - cache: "pip" - - - name: Set up Poetry ${{ inputs.poetry-version }} - uses: abatilo/actions-poetry@v2 - with: - poetry-version: ${{ inputs.poetry-version }} - name: create logs and reports dir run: | mkdir logs mkdir reports - - name: install packages - run: poetry install - - name: run LNbits env: LNBITS_ADMIN_UI: true @@ -48,7 +38,6 @@ jobs: poetry run lnbits > logs/lnbits.log & sleep 5 - - name: install jmeter run: | java -version