bump github action versions (#2680)

* bump gh action versions

* left out files
This commit is contained in:
Martin Xu 2024-02-21 15:01:59 -08:00 committed by GitHub
parent a6fb25e139
commit 24ccb2a2aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 47 additions and 49 deletions

View File

@ -29,10 +29,10 @@ inputs:
default: '.venv' default: '.venv'
runs: 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 }}
@ -51,7 +51,7 @@ runs:
- name: Restore cached poetry install - name: Restore cached poetry install
id: restore-poetry-cache id: restore-poetry-cache
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ~/.local path: ~/.local
key: ${{ runner.os }}-python-${{ inputs.python-version }}-poetry-${{ inputs.poetry-version }} key: ${{ runner.os }}-python-${{ inputs.python-version }}-poetry-${{ inputs.poetry-version }}
@ -67,14 +67,14 @@ runs:
- if: steps.restore-poetry-cache.outputs.cache-hit != 'true' - if: steps.restore-poetry-cache.outputs.cache-hit != 'true'
name: Save poetry install to cache name: Save poetry install to cache
uses: actions/cache/save@v3 uses: actions/cache/save@v4
with: with:
path: ~/.local path: ~/.local
key: ${{ steps.restore-poetry-cache.outputs.cache-primary-key }} key: ${{ steps.restore-poetry-cache.outputs.cache-primary-key }}
- name: Restore cached project python deps - name: Restore cached project python deps
id: restore-pydeps-cache id: restore-pydeps-cache
uses: actions/cache/restore@v3 uses: actions/cache/restore@v4
with: with:
path: ${{ inputs.create-venv-at-path }} path: ${{ inputs.create-venv-at-path }}
key: ${{ runner.os }}-python-${{ inputs.python-version }}-pydeps-${{ hashFiles('**/poetry.lock') }} key: ${{ runner.os }}-python-${{ inputs.python-version }}-pydeps-${{ hashFiles('**/poetry.lock') }}
@ -93,7 +93,7 @@ runs:
- if: steps.restore-pydeps-cache.outputs.cache-hit != 'true' - if: steps.restore-pydeps-cache.outputs.cache-hit != 'true'
name: Save Python deps to cache name: Save Python deps to cache
uses: actions/cache/save@v3 uses: actions/cache/save@v4
with: with:
path: ${{ inputs.create-venv-at-path }} path: ${{ inputs.create-venv-at-path }}
key: ${{ steps.restore-pydeps-cache.outputs.cache-primary-key }} key: ${{ steps.restore-pydeps-cache.outputs.cache-primary-key }}
@ -105,4 +105,4 @@ runs:
shell: bash shell: bash
run: | run: |
source ${{ inputs.create-venv-at-path }}/*/activate source ${{ inputs.create-venv-at-path }}/*/activate
poetry install --only-root --no-interaction poetry install --only-root --no-interaction

View File

@ -2,11 +2,11 @@ name: benchmarking
on: on:
push: push:
branches: [ main ] branches: [main]
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
pull_request: pull_request:
branches: [ main ] branches: [main]
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
@ -18,9 +18,9 @@ defaults:
shell: bash shell: bash
env: env:
PYTHONIOENCODING: "utf8" PYTHONIOENCODING: 'utf8'
TELEMETRY_ENABLED: false TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: '--max_old_space_size=4096'
jobs: jobs:
reflex-web: reflex-web:
@ -28,15 +28,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
# Show OS combos first in GUI # Show OS combos first in GUI
os: [ ubuntu-latest] os: [ubuntu-latest]
python-version: [ "3.11.4" ] python-version: ['3.11.4']
node-version: [ "16.x" ] node-version: ['16.x']
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/setup_build_env - uses: ./.github/actions/setup_build_env
@ -64,12 +64,11 @@ jobs:
npm -v npm -v
poetry run bash scripts/benchmarks.sh ./reflex-web prod poetry run bash scripts/benchmarks.sh ./reflex-web prod
env: env:
LHCI_GITHUB_APP_TOKEN: $ LHCI_GITHUB_APP_TOKEN: $
- name: Run Benchmarks - name: Run Benchmarks
working-directory: ./integration/benchmarks working-directory: ./integration/benchmarks
run: run: poetry run python benchmarks.py "$GITHUB_SHA" .lighthouseci
poetry run python benchmarks.py "$GITHUB_SHA" .lighthouseci
env: env:
GITHUB_SHA: ${{ github.sha }} GITHUB_SHA: ${{ github.sha }}
DATABASE_URL: ${{ secrets.DATABASE_URL }} DATABASE_URL: ${{ secrets.DATABASE_URL }}
PR_TITLE: ${{ github.event.pull_request.title }} PR_TITLE: ${{ github.event.pull_request.title }}

View File

@ -48,7 +48,7 @@ jobs:
REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }} REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }}
run: | run: |
poetry run pytest integration poetry run pytest integration
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
name: Upload failed test screenshots name: Upload failed test screenshots
if: always() if: always()
with: with:

View File

@ -2,11 +2,11 @@ name: integration-tests
on: on:
push: push:
branches: [ "main" ] branches: ['main']
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
@ -23,9 +23,9 @@ env:
# TODO: can we fix windows encoding natively within reflex? Bug above can hit real users too (less common, but possible) # TODO: can we fix windows encoding natively within reflex? Bug above can hit real users too (less common, but possible)
# - Catch encoding errors when printing logs # - Catch encoding errors when printing logs
# - Best effort print lines that contain illegal chars (map to some default char, etc.) # - Best effort print lines that contain illegal chars (map to some default char, etc.)
PYTHONIOENCODING: "utf8" PYTHONIOENCODING: 'utf8'
TELEMETRY_ENABLED: false TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: '--max_old_space_size=4096'
jobs: jobs:
example-counter: example-counter:
@ -35,29 +35,29 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
# Show OS combos first in GUI # Show OS combos first in GUI
os: [ ubuntu-latest, windows-latest, macos-latest ] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [ "16.x" ] node-version: ['16.x']
python-version: ["3.8.18", "3.9.18", "3.10.13", "3.11.5", "3.12.0"] python-version: ['3.8.18', '3.9.18', '3.10.13', '3.11.5', '3.12.0']
exclude: exclude:
- os: windows-latest - os: windows-latest
python-version: "3.10.13" python-version: '3.10.13'
- os: windows-latest - os: windows-latest
python-version: "3.9.18" python-version: '3.9.18'
- os: windows-latest - os: windows-latest
python-version: "3.8.18" python-version: '3.8.18'
include: include:
- os: windows-latest - os: windows-latest
python-version: "3.10.11" python-version: '3.10.11'
- os: windows-latest - os: windows-latest
python-version: "3.9.13" python-version: '3.9.13'
- os: windows-latest - os: windows-latest
python-version: "3.8.10" python-version: '3.8.10'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/setup_build_env - uses: ./.github/actions/setup_build_env
@ -102,17 +102,17 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
# Show OS combos first in GUI # Show OS combos first in GUI
os: [ ubuntu-latest, windows-latest, macos-latest ] os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [ "3.10.10", "3.11.4" ] python-version: ['3.10.10', '3.11.4']
node-version: [ "16.x" ] node-version: ['16.x']
env: env:
REFLEX_WEB_WINDOWS_OVERRIDE: "1" REFLEX_WEB_WINDOWS_OVERRIDE: '1'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/setup_build_env - uses: ./.github/actions/setup_build_env
@ -138,4 +138,4 @@ jobs:
run: | run: |
# Check that npm is home # Check that npm is home
npm -v npm -v
poetry run bash scripts/integration.sh ./reflex-web prod poetry run bash scripts/integration.sh ./reflex-web prod

View File

@ -2,11 +2,11 @@ name: integration-tests-wsl
on: on:
push: push:
branches: [ "main" ] branches: ['main']
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
paths-ignore: paths-ignore:
- '**/*.md' - '**/*.md'
@ -15,7 +15,7 @@ permissions:
env: env:
TELEMETRY_ENABLED: false TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: '--max_old_space_size=4096'
jobs: jobs:
example-counter-wsl: example-counter-wsl:
@ -32,7 +32,7 @@ jobs:
repository: reflex-dev/reflex-examples repository: reflex-dev/reflex-examples
path: reflex-examples path: reflex-examples
- uses: Vampire/setup-wsl@v2 - uses: Vampire/setup-wsl@v3
- name: Install Python - name: Install Python
shell: wsl-bash {0} shell: wsl-bash {0}

View File

@ -2,12 +2,12 @@ name: pre-commit
on: on:
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
push: push:
# Note even though this job is called "pre-commit" and runs "pre-commit", this job will run # Note even though this job is called "pre-commit" and runs "pre-commit", this job will run
# also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves # also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves
# when merging into main branch. # when merging into main branch.
branches: [ "main" ] branches: ['main']
jobs: jobs:
pre-commit: pre-commit:
@ -21,7 +21,6 @@ jobs:
# i.e. ruff, black, etc. # i.e. ruff, black, etc.
python-version: 3.11.5 python-version: 3.11.5
run-poetry-install: true run-poetry-install: true
shell: bash
create-venv-at-path: .venv create-venv-at-path: .venv
# TODO pre-commit related stuff can be cached too (not a bottleneck yet) # TODO pre-commit related stuff can be cached too (not a bottleneck yet)
- run: | - run: |