Skip to content

Commit

Permalink
Merge pull request #57 from blink1073/version-inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Mar 2, 2022
2 parents afdd786 + 3200797 commit accfadf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/actions/base-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: "Base Setup"
description: "Base Setup Actions Used Across Workflows"
inputs:
python_version:
description: "The python version"
node_version:
description: "The node version"
runs:
using: "composite"
steps:
- name: Set Versions
shell: bash
run: |
echo "PYTHON_VERSION=${{ matrix.python-version || '3.9' }}" >> $GITHUB_ENV
echo "NODE_VERSION=${{ matrix.node-version || '14.x' }}" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ inputs.python_version || matrix.python-version || '3.9' }}" >> $GITHUB_ENV
echo "NODE_VERSION=${{ inputs.node_version || matrix.node-version || '14.x' }}" >> $GITHUB_ENV
echo "CACHE_PREFIX=${{ runner.os }}-${{ github.workflow}}-${{ github.job }}" >> $GITHUB_ENV
- name: Install Python
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ on:
branches: ["*"]

jobs:
base_setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Base Setup
uses: ./.github/actions/base-setup
with:
python_version: 3.7
node_version: 15.0

downstream_defaults:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ on:
jobs:
test_minimums:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"] # Test against minimum Python version as well
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "3.7" # Test against minimum Python version as well
- name: Install miniumum versions
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
- name: Run the unit tests
Expand Down

0 comments on commit accfadf

Please sign in to comment.