Bump jsonpath-plus from 10.2.0 to 10.3.0 #2731
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
# Make sure these match with the matrix.os values below | |
env: | |
OS_WINDOWS: windows-latest | |
OS_MACOS: macos-latest | |
# The Ubuntu version must align with the "core" version in electron-builder.json5 | |
OS_LINUX: ubuntu-22.04 | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
# The branches below should be a subset of the branches above | |
branches: ['main'] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
test: | |
name: Build on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Make sure these match with the env values above | |
os: [windows-latest, macos-latest, ubuntu-22.04] | |
dotnet_version: [8.0.x] | |
steps: | |
- name: Install MacPorts | |
if: ${{ matrix.os == env.OS_MACOS }} | |
uses: melusina-org/setup-macports@v1 | |
- name: Update MacPorts ports tree | |
if: ${{ matrix.os == 'macos-latest' }} | |
# Not using `-v` for verbose because it is very slow and does not add much value | |
run: | | |
sudo port sync | |
- name: Install loader tools on macOS | |
if: ${{ matrix.os == env.OS_MACOS }} | |
run: | | |
sudo port -v install ld64 | |
- name: Install icu4c on macOS | |
if: ${{ matrix.os == env.OS_MACOS }} | |
run: | | |
sudo port -v install icu @76.1_0 +universal | |
- name: Fixup loader paths for icu4c | |
if: ${{ matrix.os == env.OS_MACOS }} | |
# LIB_DEPENDENCIES are of the form "<ICU lib short name> <dependency as ICU lib short name>" | |
# For example, libicuuc (shortened to "uc") depends on libicudata (shortened to "data") | |
# Dependencies can be seen by running "dyld_info -dependents /path/to/something.dylib" | |
run: | | |
ICU_VERSION=76 | |
LIB_DEPENDENCIES=" | |
i18n data | |
i18n uc | |
io data | |
io i18n | |
io uc | |
uc data | |
" | |
LIB_DEPENDENCIES=$(echo "$LIB_DEPENDENCIES" | sed '/^$/d') | |
while IFS= read -r line; do | |
set -- $line | |
sudo install_name_tool -change "/opt/local/lib/libicu$2.$ICU_VERSION.dylib" "@loader_path/libicu$2.$ICU_VERSION.dylib" "/opt/local/lib/libicu$1.$ICU_VERSION.dylib" | |
done <<< "$LIB_DEPENDENCIES" | |
- name: Install snap tools on Linux | |
if: ${{ matrix.os == env.OS_LINUX }} | |
run: | | |
sudo apt update | |
sudo apt install -y snapd | |
sudo snap install snapcraft --classic | |
sudo snap install lxd | |
sudo snap refresh lxd | |
sudo lxd init --auto | |
# Add the current user to the lxd group | |
getent group lxd | grep -qwF "$USER" || sudo usermod -aG lxd "$USER" | |
newgrp lxd | |
# Force the socket to be usable by the current user | |
sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket | |
# https://github.com/canonical/action-build/blob/master/src/tools.ts#L54 | |
sudo iptables -P FORWARD ACCEPT | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet_version }} | |
- name: Read package.json | |
id: package_json | |
uses: zoexx/github-action-json-file-properties@1.0.6 | |
with: | |
file_path: 'package.json' | |
- name: Install Node.js and NPM | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ fromJson(steps.package_json.outputs.volta).node }} | |
cache: npm | |
- name: Install packages | |
run: npm ci | |
- name: type checking | |
run: npm run typecheck | |
- name: Build | |
run: npm run build | |
- name: Verify no files changed after build | |
id: verify-changed-files | |
uses: tj-actions/verify-changed-files@v20 | |
- name: Report file changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
env: | |
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} | |
run: | | |
echo "Error - changed files after build: $CHANGED_FILES" | |
exit 1 | |
- name: dotnet unit tests | |
run: dotnet test c-sharp-tests/c-sharp-tests.csproj | |
- name: npm unit tests | |
run: npm test | |
- name: check dotnet formatting | |
run: | | |
cd c-sharp | |
dotnet tool restore | |
dotnet csharpier --check . | |
- name: check JS/TS formatting | |
run: npm run format:check | |
- name: check JS/TS linting | |
run: npm run lint | |
- name: check packaging | |
env: | |
# no hardlinks so dependencies are copied | |
USE_HARD_LINKS: false | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npm run package | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true |