diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03184c2dba26..4188f7c981f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,40 +18,16 @@ jobs: include: - name: Tests command: bin/tests --postgresql-host localhost - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Lint command: bin/lint - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Documentation command: bin/docs - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Dependencies command: bin/github-actions-deps - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Licenses command: bin/licenses - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Translations command: bin/translations - needs-python: ${{ true }} - needs-node: ${{ false }} - - name: Static Tests - command: bin/static_tests - needs-python: ${{ false }} - needs-node: ${{ true }} - - name: Static Lint - command: bin/static_lint - needs-python: ${{ false }} - needs-node: ${{ true }} - - name: Static Pipeline - command: bin/static_pipeline - needs-python: ${{ false }} - needs-node: ${{ true }} runs-on: ubuntu-latest services: postgres: @@ -77,7 +53,6 @@ jobs: sudo apt -y update sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config - uses: actions/setup-python@v4 - if: ${{ matrix.needs-python }} with: python-version-file: '.python-version' cache: 'pip' @@ -85,7 +60,6 @@ jobs: requirements.txt requirements/*.txt - name: Cache common Python cache paths - if: ${{ matrix.needs-python }} uses: actions/cache@v3 with: path: | @@ -93,19 +67,10 @@ jobs: .mypy_cache key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements/lint.txt') }} - name: Install Python dependencies - if: ${{ matrix.needs-python }} run: | pip install -U pip setuptools wheel pip install -r requirements.txt --no-deps pip install -r requirements/dev.txt pip check - - uses: actions/setup-node@v3 - if: ${{ matrix.needs-node }} - with: - node-version: 18.13.0 - cache: 'npm' - - name: Install Node dependencies - if: ${{ matrix.needs-node }} - run: npm ci - name: Run ${{ matrix.name }} run: ${{ matrix.command }} diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml new file mode 100644 index 000000000000..bcb0f04068c6 --- /dev/null +++ b/.github/workflows/node-ci.yml @@ -0,0 +1,37 @@ +name: Node CI +on: + push: + branches: + - main + pull_request: + merge_group: + types: [checks_requested] +permissions: + contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true +jobs: + test: + strategy: + matrix: + include: + - name: Static Tests + command: bin/static_tests + - name: Static Lint + command: bin/static_lint + - name: Static Pipeline + command: bin/static_pipeline + runs-on: ubuntu-latest + name: ${{ matrix.name }} + steps: + - name: Check out repository + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18.13.0 + cache: 'npm' + - name: Install Node dependencies + run: npm ci + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }}