Skip to content

Commit

Permalink
test: extract node ci to own file
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Jun 12, 2022
1 parent 8b53d83 commit a184ebb
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 44 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci-node.yml
@@ -0,0 +1,34 @@
name: CI - Node
on:
push:
branches:
- main
pull_request:
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
name: ${{ matrix.name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.15.5
cache: 'npm'
- name: Install Node dependencies
run: npm ci
- name: Run ${{ matrix.name }}
run: ${{ matrix.command }}
71 changes: 27 additions & 44 deletions .github/workflows/ci.yml → .github/workflows/ci-python.yml
@@ -1,4 +1,4 @@
name: CI
name: CI - Python
on:
push:
branches:
Expand All @@ -10,46 +10,44 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
install:
runs-on: ubuntu-latest
name: Install Python Dependencies
steps:
- uses: actions/checkout@v3
- name: Install platform dependencies
run: |
sudo apt -y update
sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
cache: 'pip'
cache-dependency-path: |
requirements.txt
requirements/*.txt
- name: Install Python dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements.txt --no-deps
pip install -r requirements/dev.txt
test:
needs: install
strategy:
matrix:
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 @@ -60,31 +58,16 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install platform dependencies
run: |
sudo apt -y update
sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config
# - name: Install platform dependencies
# run: |
# 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: 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
- uses: actions/setup-node@v3
if: ${{ matrix.needs-node }}
with:
node-version: 14.15.5
cache: 'npm'
- name: Install Node dependencies
if: ${{ matrix.needs-node }}
run: npm ci
- name: Run ${{ matrix.name }}
run: ${{ matrix.command }}

0 comments on commit a184ebb

Please sign in to comment.