diff --git a/.github/workflows/automated-checks.yml b/.github/workflows/automated-checks.yml index 4ef2f96..d17092f 100644 --- a/.github/workflows/automated-checks.yml +++ b/.github/workflows/automated-checks.yml @@ -1,5 +1,11 @@ name: Tests +env: + COVERAGE_DATABASE_VERSION: mariadb:10.11 + COVERAGE_PYTHON_VERSION: 3.12 + NODE_VERSION: 22 # [LTS] End of Life: 30 Apr 2027 (https://endoflife.date/nodejs) + REDIS_VERSION: latest + on: push: branches: @@ -27,17 +33,19 @@ jobs: uses: actions/checkout@v4 # Set up Python - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file +# - name: Set up Python +# uses: actions/setup-python@v5 +# with: +# python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file # Set up Node.js - name: Setup Node.js uses: actions/setup-node@v4 with: # https://endoflife.date/nodejs - node-version: '20' # [LTS] End of Life: 30 Apr 2026 + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: 'package-lock.json' - run: npm install - name: Run Pre Commit Checks @@ -45,7 +53,7 @@ jobs: # Run Test Coverage test-coverage: - needs: [pre-commit] + needs: [ pre-commit ] name: AA Latest (Python ${{ matrix.python-version }} with ${{ matrix.database }}) runs-on: ubuntu-latest @@ -86,11 +94,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # Install redis + # Install redis - name: Install redis uses: shogo82148/actions-setup-redis@v1 with: - redis-version: "latest" + redis-version: ${{ env.REDIS_VERSION }} # Verify that redis is up - name: Verify that redis is up @@ -128,8 +136,8 @@ jobs: ) ) && ( - matrix.python-version == '3.12' - && matrix.database == 'mariadb:10.11' + matrix.python-version == env.COVERAGE_PYTHON_VERSION + && matrix.database == env.COVERAGE_DATABASE_VERSION ) }} uses: codecov/codecov-action@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cdd4572..208352f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,7 @@ default_language_version: # force all unspecified python hooks to run python3 python: python3 + node: 22.4.1 # https://pre-commit.ci/ ci: @@ -132,6 +133,7 @@ repos: - id: eslint name: ESLint description: Check for problems in JavaScript files. + language: node exclude: | (?x)( .min(.js|.js.map)| @@ -148,6 +150,7 @@ repos: - id: stylelint name: Stylelint description: Check for problems in CSS files. + language: node exclude: | (?x)( .min(.css|.css.map)|