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
This commit is contained in:
dni ⚡ 2024-03-26 14:18:58 +01:00 committed by GitHub
parent b9f0af0e79
commit cdc102af07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 33 additions and 20 deletions

View file

@ -10,7 +10,7 @@ inputs:
default: "1.7.0" default: "1.7.0"
node-version: node-version:
description: "Node Version" description: "Node Version"
default: "18.x" default: "20.x"
npm: npm:
description: "use npm" description: "use npm"
default: false default: false
@ -21,7 +21,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Set up Python ${{ inputs.python-version }} - name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
# cache poetry install via pip # cache poetry install via pip
@ -38,7 +38,7 @@ runs:
poetry config virtualenvs.create true --local poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project 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 name: Define a cache for the virtual environment based on the dependencies lock file
with: with:
path: ./.venv path: ./.venv
@ -50,11 +50,11 @@ runs:
- name: Use Node.js ${{ inputs.node-version }} - name: Use Node.js ${{ inputs.node-version }}
if: ${{ (inputs.npm == 'true') }} if: ${{ (inputs.npm == 'true') }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ inputs.node-version }} node-version: ${{ inputs.node-version }}
- uses: actions/cache@v3 - uses: actions/cache@v4
if: ${{ (inputs.npm == 'true') }} if: ${{ (inputs.npm == 'true') }}
name: Define a cache for the npm based on the dependencies lock file name: Define a cache for the npm based on the dependencies lock file
with: with:

View file

@ -21,6 +21,8 @@ jobs:
uses: ./.github/workflows/tests.yml uses: ./.github/workflows/tests.yml
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
migrations: migrations:
needs: [ lint ] needs: [ lint ]
@ -31,6 +33,8 @@ jobs:
with: with:
make: test-migration make: test-migration
db-name: migration db-name: migration
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
openapi: openapi:
needs: [ lint ] needs: [ lint ]
@ -48,6 +52,8 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
backend-wallet-class: ${{ matrix.backend-wallet-class }} backend-wallet-class: ${{ matrix.backend-wallet-class }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jmeter: jmeter:
strategy: strategy:

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
- run: git checkout HEAD^2 - run: git checkout HEAD^2

View file

@ -18,10 +18,10 @@ jobs:
action_build: action_build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }} - name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
cache: "pip" cache: "pip"
@ -88,11 +88,10 @@ jobs:
done done
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: ${{ always() }} if: ${{ always() }}
with: with:
name: jmeter-test-results name: jmeter-test-results
path: | path: |
reports/ reports/
logs/ logs/

View file

@ -25,7 +25,7 @@ jobs:
node-version: ["18.x"] node-version: ["18.x"]
runs-on: ${{ matrix.os-version }} runs-on: ${{ matrix.os-version }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/actions/prepare - uses: ./.github/actions/prepare
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}

View file

@ -15,21 +15,24 @@ on:
backend-wallet-class: backend-wallet-class:
required: true required: true
type: string type: string
secrets:
CODECOV_TOKEN:
required: true
jobs: jobs:
regtest: regtest:
runs-on: ${{ inputs.os-version }} runs-on: ${{ inputs.os-version }}
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }} if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }}
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Build and push - name: Build and push
if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }} if: ${{ inputs.backend-wallet-class == 'LNbitsWallet' }}
uses: docker/build-push-action@v4 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: false push: false
@ -75,7 +78,8 @@ jobs:
run: make test-real-wallet run: make test-real-wallet
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v4
with: with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

View file

@ -13,7 +13,7 @@ jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Create github release - name: Create github release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -18,6 +18,9 @@ on:
db-name: db-name:
default: "lnbits" default: "lnbits"
type: string type: string
secrets:
CODECOV_TOKEN:
required: true
jobs: jobs:
tests: tests:
@ -39,7 +42,7 @@ jobs:
--health-retries 5 --health-retries 5
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: ./.github/actions/prepare - uses: ./.github/actions/prepare
with: with:
@ -52,7 +55,8 @@ jobs:
run: make ${{ inputs.make }} run: make ${{ inputs.make }}
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v4
with: with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true