Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): extract node to own workflow #13059

Merged
merged 4 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -77,35 +53,24 @@ 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'
cache-dependency-path: |
requirements.txt
requirements/*.txt
- name: Cache common Python cache paths
if: ${{ matrix.needs-python }}
uses: actions/cache@v3
with:
path: |
.cache
.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 }}
37 changes: 37 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}