Skip to content

Commit

Permalink
Fix CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmooney committed Feb 6, 2024
1 parent d803d48 commit eb16de9
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 9 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@ on:
push:
branches: [main]

defaults:
run:
shell: bash -l {0}

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
python-version: 3.7
environment-name: ipywebrtc-dev
environment-file: dev_environment.yml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
auto-activate-base: false
channels: conda-forge

- name: Install dependencies
run: |
pip install ".[dev]"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
auto-activate-base: false
channels: conda-forge

- name: Test flake8
run: flake8 ipywebrtc --ignore=E501,F405

- name: Install ipywebrtc
run: pip install .

Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: "v3.1.0"
hooks:
- id: prettier
types: [javascript]
stages: [commit]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.9"
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
**/node_modules
**/lib
**/package.json
4 changes: 2 additions & 2 deletions dev_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- pip
- nodejs=14.*
- nodejs=16.*
- yarn
- jupyter-packaging
- jupyterlab=3
Expand All @@ -15,4 +15,4 @@ dependencies:
- sphinx_rtd_theme
- pygments==2.6.1
- jupyter-sphinx
- precommit
- pre-commit
7 changes: 7 additions & 0 deletions js/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var version = require("./package.json").version;
var webpack = require("webpack");
var crypto = require("crypto");

// // Custom webpack loaders are generally the same for all webpack bundles, hence
// // stored in a separate local variable.
// var loaders = [
Expand All @@ -8,6 +10,11 @@ var webpack = require("webpack");

const path = require("path");

// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
var cryptoOrigCreateHash = crypto.createHash;
crypto.createHash = (algorithm) =>
cryptoOrigCreateHash(algorithm == "md4" ? "sha256" : algorithm);

var rules = [
// { test: /\.json$/, use: "json-loader" },
];
Expand Down
6 changes: 6 additions & 0 deletions js/webpack.config.lab3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var path = require("path");
var webpack = require("webpack");
const crypto = require("crypto");

var plugins = [
new webpack.ProvidePlugin({
Expand All @@ -10,3 +11,8 @@ var plugins = [
module.exports = {
plugins: plugins,
};

// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
const cryptoOrigCreateHash = crypto.createHash;
crypto.createHash = (algorithm) =>
cryptoOrigCreateHash(algorithm == "md4" ? "sha256" : algorithm);
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
install_require=[
"ipywidgets>=7.4.0",
],
extras_require={"dev": ["pre-commit"]},
packages=find_packages(),
zip_safe=False,
cmdclass=cmdclass,
Expand Down

0 comments on commit eb16de9

Please sign in to comment.