Skip to content

allow independent py/js package releases #949

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

Merged
merged 3 commits into from
Mar 14, 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
25 changes: 14 additions & 11 deletions .github/workflows/.nox-session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ name: Nox Session
on:
workflow_call:
inputs:
job-name:
required: true
type: string
nox-args:
required: true
type: string
session-args:
nox-env:
required: false
type: string
default: "{}"
nox-session-args:
required: false
type: string
runs-on-array:
Expand All @@ -17,32 +24,28 @@ 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)}}
python-version: ${{fromJson(inputs.python-version-array)}}
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
- name: Pin 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 ${{ inputs.nox-args }} --stop-on-first-error -- ${{ inputs.session-args }}
- name: Run Sessions
env: ${{ fromJson(inputs.nox-env) }}
run: nox ${{ inputs.nox-args }} --stop-on-first-error -- ${{ inputs.nox-session-args }}
60 changes: 30 additions & 30 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: codeql

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '43 3 * * 3'
- cron: "43 3 * * 3"

jobs:
analyze:
Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
language: ["javascript", "python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Deploy Documentation
name: deploy-docs

on:
push:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/publish-js.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/publish-py.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This workflows will upload a Javscript Package using NPM to npmjs.org when a release is created
# For more information see: https://docs.github.com/en/actions/guides/publishing-nodejs-packages

name: publish

on:
release:
types: [published]

jobs:
publish:
uses: ./.github/workflows/.nox-session.yml
with:
job-name: "publish"
nox-args: "-s publish"
nox-env: >
{
"NODE_AUTH_TOKEN": "${{ secrets.NPM_AUTOMATION_TOKEN }}",
"PYPI_USERNAME": "${{ secrets.PYPI_USERNAME }}",
"PYPI_PASSWORD": "${{ secrets.PYPI_PASSWORD }}"
}
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
with:
job-name: "python-{0}"
nox-args: "-t check-python"
session-args: "--pytest --maxfail=3 --reruns 3"
nox-session-args: "--pytest --maxfail=3 --reruns 3"
python-environments:
uses: ./.github/workflows/.nox-session.yml
with:
job-name: "python-{0} {1}"
nox-args: "-s check-python-tests"
session-args: "--no-cov --pytest --maxfail=3 --reruns 3"
nox-session-args: "--no-cov --pytest --maxfail=3 --reruns 3"
runs-on-array: '["ubuntu-latest", "macos-latest", "windows-latest"]'
python-version-array: '["3.7", "3.8", "3.9", "3.10", "3.11"]'
docs:
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Loading