From cdc102af077cfa30e21c0d529f946826919d9375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 26 Mar 2024 14:18:58 +0100 Subject: [PATCH] chore: update to node 20.x on workflows (#2364) gets rid of deprecating warnings in actions * checkout@v4 * cache@v4 * setup-python@v5 * setup-node@v4 * codecov-action@v4 * codecov pass token from ci --- .github/actions/prepare/action.yml | 10 +++++----- .github/workflows/ci.yml | 6 ++++++ .github/workflows/codeql.yml | 2 +- .github/workflows/jmeter.yml | 7 +++---- .github/workflows/make.yml | 2 +- .github/workflows/regtest.yml | 14 +++++++++----- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 10 +++++++--- 8 files changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml index 64273bd1..7ebee9b0 100644 --- a/.github/actions/prepare/action.yml +++ b/.github/actions/prepare/action.yml @@ -10,7 +10,7 @@ inputs: default: "1.7.0" node-version: description: "Node Version" - default: "18.x" + default: "20.x" npm: description: "use npm" default: false @@ -21,7 +21,7 @@ runs: using: "composite" steps: - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} # cache poetry install via pip @@ -38,7 +38,7 @@ runs: poetry config virtualenvs.create true --local poetry config virtualenvs.in-project true --local - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Define a cache for the virtual environment based on the dependencies lock file with: path: ./.venv @@ -50,11 +50,11 @@ runs: - name: Use Node.js ${{ inputs.node-version }} if: ${{ (inputs.npm == 'true') }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: ${{ (inputs.npm == 'true') }} name: Define a cache for the npm based on the dependencies lock file with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e81274d7..53bcb141 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: uses: ./.github/workflows/tests.yml with: python-version: ${{ matrix.python-version }} + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} migrations: needs: [ lint ] @@ -31,6 +33,8 @@ jobs: with: make: test-migration db-name: migration + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} openapi: needs: [ lint ] @@ -48,6 +52,8 @@ jobs: with: python-version: ${{ matrix.python-version }} backend-wallet-class: ${{ matrix.backend-wallet-class }} + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} jmeter: strategy: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5cdd4139..ee221256 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 - run: git checkout HEAD^2 diff --git a/.github/workflows/jmeter.yml b/.github/workflows/jmeter.yml index 274b394f..a736773a 100644 --- a/.github/workflows/jmeter.yml +++ b/.github/workflows/jmeter.yml @@ -18,10 +18,10 @@ jobs: action_build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} cache: "pip" @@ -88,11 +88,10 @@ jobs: done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: jmeter-test-results path: | reports/ logs/ - diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 4a71de52..5f8694fb 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -25,7 +25,7 @@ jobs: node-version: ["18.x"] runs-on: ${{ matrix.os-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/prepare with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/regtest.yml b/.github/workflows/regtest.yml index 5cd2f753..a51f681e 100644 --- a/.github/workflows/regtest.yml +++ b/.github/workflows/regtest.yml @@ -15,21 +15,24 @@ on: backend-wallet-class: required: true type: string + secrets: + CODECOV_TOKEN: + required: true jobs: regtest: runs-on: ${{ inputs.os-version }} timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }} - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: false @@ -75,7 +78,8 @@ jobs: run: make test-real-wallet - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b343c42..616f80a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create github release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 751ce7c6..1b7c0ebb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,9 @@ on: db-name: default: "lnbits" type: string + secrets: + CODECOV_TOKEN: + required: true jobs: tests: @@ -39,7 +42,7 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/prepare with: @@ -52,7 +55,8 @@ jobs: run: make ${{ inputs.make }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true