From 5e8e479f36746b146cb531ddbf1c60eeea0f0494 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Fri, 15 Jul 2022 12:25:39 -0700 Subject: [PATCH 1/3] make nox-session reusable workflow --- .github/workflows/.nox-session.yml | 43 +++++++++++++++ .github/workflows/test.yml | 84 ++++++------------------------ 2 files changed, 59 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/.nox-session.yml diff --git a/.github/workflows/.nox-session.yml b/.github/workflows/.nox-session.yml new file mode 100644 index 000000000..a871aa03f --- /dev/null +++ b/.github/workflows/.nox-session.yml @@ -0,0 +1,43 @@ +name: Nox Session + +on: + workflow_call: + inputs: + session-name: + required: true + type: string + session-arguments: + required: false + type: string + runs-on-array: + required: false + type: string + default: '["ubuntu-latest"]' + python-version-array: + required: false + type: string + default: '["3.x"]' + +jobs: + nox-session: + strategy: + matrix: + runs-on: ${{fromJson(inputs.runs-on-array)}} + python-version: ${{fromJson(inputs.python-version-array)}} + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "14.x" + - name: Install Specific NPM Version + run: npm install -g npm@8.3 + - name: Use Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python Dependencies + run: pip install -r requirements/nox-deps.txt + - name: Run Tests + env: { "CI": "true" } + run: nox -s ${{ inputs.session-name }} --stop-on-first-error -- ${{ inputs.session-arguments }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aca12805a..498c1c33b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,74 +12,22 @@ on: jobs: test-python-coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: "14.x" - - name: Install Specific NPM Version - run: npm install -g npm@8.3 - - name: Use Latest Python - uses: actions/setup-python@v2 - with: - python-version: "3.9" - - name: Install Python Dependencies - run: pip install -r requirements/nox-deps.txt - - name: Run Tests - env: { "CI": "true" } - run: nox -s test_python_suite -- --maxfail=3 + uses: ./.github/workflows/.nox-session.yml + with: + session-name: test_python_suite + session-arguments: --maxfail=3 test-python-environments: - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: "14.x" - - name: Install Specific NPM Version - run: npm install -g npm@8.3 - - name: Use Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python Dependencies - run: pip install -r requirements/nox-deps.txt - - name: Run Tests - env: { "CI": "true" } - run: nox -s test_python --stop-on-first-error -- --maxfail=3 --no-cov + uses: ./.github/workflows/.nox-session.yml + with: + session-name: test_python_suite + session-arguments: --maxfail=3 --no-cov + runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]' + python-version-array: '["3.7", "3.8", "3.9", "3.10"]' test-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: "14.x" - - name: Install Specific NPM Version - run: npm install -g npm@8.3 - - name: Use Latest Python - uses: actions/setup-python@v2 - with: - python-version: "3.9" - - name: Install Python Dependencies - run: pip install -r requirements/nox-deps.txt - - name: Run Tests - env: { "CI": "true" } - run: nox -s test_docs + uses: ./.github/workflows/.nox-session.yml + with: + session-name: test_docs test-javascript: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: "14.x" - - name: Install Specific NPM Version - run: npm install -g npm@8.3 - - name: Install Python Dependencies - run: pip install -r requirements/nox-deps.txt - - name: Run Tests - env: { "CI": "true" } - run: nox -s test_javascript + uses: ./.github/workflows/.nox-session.yml + with: + session-name: test_javascript From fdfe11259b07d9a51098e3dd66b7b838600087dc Mon Sep 17 00:00:00 2001 From: rmorshea Date: Fri, 15 Jul 2022 12:37:19 -0700 Subject: [PATCH 2/3] bump sphinx ver --- docs/source/_custom_js/package-lock.json | 2 +- requirements/build-docs.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/_custom_js/package-lock.json b/docs/source/_custom_js/package-lock.json index dd27b5c34..e6bf270c5 100644 --- a/docs/source/_custom_js/package-lock.json +++ b/docs/source/_custom_js/package-lock.json @@ -19,7 +19,7 @@ } }, "../../../src/client/packages/idom-client-react": { - "version": "0.38.1", + "version": "0.39.0", "integrity": "sha512-pIK5eNwFSHKXg7ClpASWFVKyZDYxz59MSFpVaX/OqJFkrJaAxBuhKGXNTMXmuyWOL5Iyvb/ErwwDRxQRzMNkfQ==", "license": "MIT", "dependencies": { diff --git a/requirements/build-docs.txt b/requirements/build-docs.txt index c47d862c0..a0eed26be 100644 --- a/requirements/build-docs.txt +++ b/requirements/build-docs.txt @@ -1,4 +1,4 @@ -sphinx ==4.1.2 +sphinx ==4.2.0 sphinx-autodoc-typehints ==1.7.0 furo ==2021.10.09 setuptools_scm From 964d238c9945de89377dd67deb1be349d0168958 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Fri, 15 Jul 2022 12:52:16 -0700 Subject: [PATCH 3/3] update job names --- .github/workflows/.nox-session.yml | 5 +++++ .github/workflows/test.yml | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.nox-session.yml b/.github/workflows/.nox-session.yml index a871aa03f..8f68188cc 100644 --- a/.github/workflows/.nox-session.yml +++ b/.github/workflows/.nox-session.yml @@ -17,9 +17,14 @@ on: required: false type: string default: '["3.x"]' + job-name: + required: false + type: string + default: python-{0} {1} jobs: nox-session: + name: ${{ format(inputs.job-name, matrix.python-version, matrix.runs-on) }} strategy: matrix: runs-on: ${{fromJson(inputs.runs-on-array)}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 498c1c33b..f6eac70ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test +name: test on: push: @@ -11,23 +11,26 @@ on: - cron: "0 0 * * *" jobs: - test-python-coverage: + python-coverage: uses: ./.github/workflows/.nox-session.yml with: + job-name: "python-{0}" session-name: test_python_suite session-arguments: --maxfail=3 - test-python-environments: + python-environments: uses: ./.github/workflows/.nox-session.yml with: session-name: test_python_suite session-arguments: --maxfail=3 --no-cov runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]' python-version-array: '["3.7", "3.8", "3.9", "3.10"]' - test-docs: + docs: uses: ./.github/workflows/.nox-session.yml with: + job-name: "python-{0}" session-name: test_docs - test-javascript: + javascript: uses: ./.github/workflows/.nox-session.yml with: + job-name: "{1}" session-name: test_javascript