Skip to content

Commit

Permalink
Reduce number oj jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Jan 24, 2023
1 parent e1863a2 commit ea5a9a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 111 deletions.
54 changes: 1 addition & 53 deletions .github/workflows/_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
type: string

jobs:
lint-doc:
lint:
runs-on: ${{ inputs.os }}
name: lint-doc-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
env:
Expand Down Expand Up @@ -51,63 +51,11 @@ jobs:
${{ inputs.activate_command }}
make clean compile lint-doc
lint-styles:
runs-on: ${{ inputs.os }}
name: lint-styles-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
env:
TERM: xterm-256color # To colorize output of make tasks.

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}

- name: Use zstd for faster cache restore (windows)
if: ${{ startsWith(inputs.os, 'windows') }}
shell: cmd
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: venv
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}

- name: Lint styles
run: |
${{ inputs.activate_command }}
make clean compile lint-style
lint-typing:
runs-on: ${{ inputs.os }}
name: lint-typing-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
env:
TERM: xterm-256color # To colorize output of make tasks.

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}

- name: Use zstd for faster cache restore (windows)
if: ${{ startsWith(inputs.os, 'windows') }}
shell: cmd
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: venv
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}

- name: Lint typing
run: |
${{ inputs.activate_command }}
Expand Down
62 changes: 4 additions & 58 deletions .github/workflows/_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
type: string

jobs:
test-core:
test:
runs-on: ${{ inputs.os }}
name: test-core-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
env:
Expand Down Expand Up @@ -53,74 +53,20 @@ jobs:
path: venv/**/[Oo]pen[Ff]isca*
key: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }}

- name: Run openfisca-core tests
- name: Run Openfisca Core tests
run: |
${{ inputs.activate_command }}
make test-core
python -m coveralls --service=github
test-country-template:
runs-on: ${{ inputs.os }}
name: test-country-template-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
if: ${{ startsWith(inputs.os, 'ubuntu') }}
env:
TERM: xterm-256color # To colorize output of make tasks.

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}

- name: Cache dependencies
uses: actions/cache@v3
with:
path: venv
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}

- name: Cache build
uses: actions/cache@v3
with:
path: venv/**/[Oo]pen[Ff]isca*
key: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }}

- name: Run Country Template tests
if: ${{ startsWith(inputs.os, 'ubuntu') }}
run: |
${{ inputs.activate_command }}
make test-country
test-extension-template:
runs-on: ${{ inputs.os }}
name: test-extension-template-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}
if: ${{ startsWith(inputs.os, 'ubuntu') }}
env:
TERM: xterm-256color # To colorize output of make tasks.

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python }}

- name: Cache dependencies
uses: actions/cache@v3
with:
path: venv
key: deps-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}

- name: Cache build
uses: actions/cache@v3
with:
path: venv/**/[Oo]pen[Ff]isca*
key: build-${{ inputs.os }}-np${{ inputs.numpy }}-py${{ inputs.python }}-${{ hashFiles('setup.py') }}-${{ github.sha }}

- name: Run Extension Template tests
if: ${{ startsWith(inputs.os, 'ubuntu') }}
run: |
${{ inputs.activate_command }}
make test-extension

0 comments on commit ea5a9a5

Please sign in to comment.