Skip to content
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

Fix/deno 2 test and build #1

Merged
merged 48 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9d18828
add further type checks to catching errors, and then immediately ts-i…
rwblair Oct 14, 2024
cbe29a7
bump github workflows to use deno v2
rwblair Oct 14, 2024
0c4088e
do we really need to specify --node-modules-dir=auto for these deno c…
rwblair Oct 14, 2024
ff37b3a
allow-env during build step.
rwblair Oct 14, 2024
15ebfce
why does installing std library require special permissions?
rwblair Oct 14, 2024
8877ba6
build needs to run git, set --allow-run
rwblair Oct 14, 2024
e6aea46
should of just -A'd it eh?
rwblair Oct 14, 2024
0af7d7e
Update .github/workflows/deno_tests.yml
effigies Oct 15, 2024
a174a76
specify default import from ajv in validators/json.ts imports
rwblair Oct 15, 2024
d941cf6
Merge branch 'fix/deno_2_test_and_build' of github.com:rwblair/bids-v…
rwblair Oct 15, 2024
b67e28f
revert ajv import bump version. Deno may be installing from package.j…
rwblair Oct 15, 2024
dde7007
bump ajv in package.json. Will this break legacy?
rwblair Oct 15, 2024
0b88900
Revert "bump ajv in package.json. Will this break legacy?"
rwblair Oct 15, 2024
fd86b31
move legacy validator to its own directory.
rwblair Oct 15, 2024
3ac00ad
working-dir -> working-directory
rwblair Oct 15, 2024
3331f80
more working-directory setting. fix sym link from legacy test to curr…
rwblair Oct 15, 2024
d3258d2
more working-directory setting. fix sym link from legacy test to curr…
rwblair Oct 15, 2024
c9ed50c
in progress README updates
rwblair Oct 15, 2024
064fea7
Merge branch 'master' of github.com:bids-standard/bids-validator into…
rwblair Oct 17, 2024
c87f70c
set working directory for circleci
rwblair Oct 17, 2024
e9e919c
Merge branch 'fix/deno_2_test_and_build' of github.com:rwblair/bids-v…
rwblair Oct 17, 2024
10044b7
deno loader back to version 11
rwblair Oct 17, 2024
efbbc77
amend circle cache paths, they may not respect working-directory
rwblair Oct 17, 2024
bc6afbb
working-directory -> working_directory
rwblair Oct 17, 2024
8f4fd8f
fix call to get local version
rwblair Oct 17, 2024
25c4bb3
remove circleci config
rwblair Oct 17, 2024
0c3f8a8
first pass at deno dockerfile. Update docker github workflow accordin…
rwblair Oct 21, 2024
5f75b1e
Revert "remove circleci config"
rwblair Oct 21, 2024
6923b6f
Move dockerfile to base. Deno cli now handles git not existing.
rwblair Oct 24, 2024
ddb0e25
empty circle jobs array
rwblair Oct 24, 2024
283366d
Merge branch 'master' of github.com:bids-standard/bids-validator into…
rwblair Oct 24, 2024
a77945a
empty out circle workflows entirely
rwblair Oct 24, 2024
40dbd62
dont think working directory directive needed for docker build action…
rwblair Oct 24, 2024
7e40d43
Update .circleci/config.yml
effigies Oct 24, 2024
6fe71cc
Merge branch 'master' of github.com:bids-standard/bids-validator-temp…
rwblair Oct 24, 2024
85e5bf5
Merge remote-tracking branch 'origin/master' into fix/deno_2_test_and…
rwblair Oct 31, 2024
e36d8f5
rm legacy
rwblair Oct 31, 2024
6d85c62
Merge remote-tracking branch 'origin/master' into fix/deno_2_test_and…
effigies Oct 31, 2024
b896bbf
Merge branch 'fix/deno_2_test_and_build' of github.com:bids-standard/…
rwblair Oct 31, 2024
be52b9f
re remove legacy gitignore line
rwblair Oct 31, 2024
4b1e672
fix shcema version in deno.json
rwblair Oct 31, 2024
47b8802
Re-add bids-examples submodule
effigies Oct 31, 2024
fcefe02
Restore test data
effigies Oct 31, 2024
bd6b543
Update bids-examples
effigies Oct 31, 2024
162fdf3
Disable example that requires network access when --deny-net
effigies Oct 31, 2024
1bfec83
wat
effigies Oct 31, 2024
355d467
What is anything?
effigies Oct 31, 2024
346ae58
Okay. Working directory
effigies Oct 31, 2024
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
tests
.git
node_modules
13 changes: 8 additions & 5 deletions .github/workflows/deno_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Save describe stamp
id: describe
run: echo version=$( git describe ) >> $GITHUB_OUTPUT
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: v1.x
- run: ./build.ts
deno-version: v2.x
- run: deno --node-modules-dir=auto -A ./build.ts
working-directory: ./bids-validator
- run: deno run -A ./bids-validator/dist/validator/bids-validator.js --version
- uses: actions/upload-artifact@v4
Expand All @@ -52,14 +52,17 @@ jobs:
submodules: true
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x
- name: Set permissions with network access
run: echo 'PERMS=--allow-read --allow-write --allow-env --allow-run --allow-net' >> $GITHUB_ENV
if: ${{ matrix.allow-net }}
- name: Set permissions without network access
run: echo 'PERMS=--allow-read --allow-write --allow-env --allow-run --deny-net' >> $GITHUB_ENV
if: ${{ ! matrix.allow-net }}
- run: deno test $PERMS --coverage=cov/ src/
- name: Disable example that requires network access
run: touch tests/data/bids-examples/xeeg_hed_score/.SKIP_VALIDATION
if: ${{ ! matrix.allow-net }}
- run: deno test --node-modules-dir=auto $PERMS --coverage=cov/ src/
- name: Collect coverage
run: deno coverage cov/ --lcov --output=coverage.lcov
if: ${{ always() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/schema_web_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x
- run: deno task build
working-directory: ./web
- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schema_web_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x
- run: deno task build
working-directory: ./web
- name: Install NPM deps
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ coverage/
__pycache__/
dist/
*.egg-info/
bids-validator-web/out/
.next/

# Only use global yarn.lock
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG BASE_IMAGE=denoland/deno:2.0.1
FROM ${BASE_IMAGE} AS build
WORKDIR /src

RUN apt-get update && \
apt-get install -y git jq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ADD . .
RUN export VERSION=`git -C . -c safe.directory=* describe --tags --always` && \
jq -r ".version|=\"$VERSION\"" bids-validator/deno.json > ._deno.json

WORKDIR /src/bids-validator
RUN deno cache ./bids-validator-deno
RUN ./build.ts

FROM ${BASE_IMAGE} AS base
WORKDIR /src
COPY . .
COPY --from=build /src/._deno.json /src/bids-validator/deno.json
WORKDIR /src/bids-validator
RUN deno cache ./bids-validator-deno
ENTRYPOINT ["./bids-validator-deno"]

FROM ${BASE_IMAGE} AS min
WORKDIR /src
COPY --from=build /src/bids-validator/dist/validator/* .

ENTRYPOINT ["deno", "-A", "./bids-validator.js"]
1 change: 0 additions & 1 deletion README.md

This file was deleted.

438 changes: 438 additions & 0 deletions README.md

Large diffs are not rendered by default.

454 changes: 41 additions & 413 deletions bids-validator/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bids-validator/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import * as esbuild from 'https://deno.land/x/esbuild@v0.24.0/mod.js'
import { parse } from 'https://deno.land/std@0.223.0/flags/mod.ts'
import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.10.3"
import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.11.0"
import * as path from "https://deno.land/std@0.223.0/path/mod.ts"
import { getVersion } from './src/version.ts'

Expand Down
2 changes: 1 addition & 1 deletion bids-validator/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
]
},
"imports": {
"@ajv": "npm:ajv@8.16.0",
"@ajv": "npm:ajv@8.17.1",
"@bids/schema": "jsr:@bids/schema@0.11.4-dev.8+6e2874ce",
"@cliffy/command": "jsr:@cliffy/command@1.0.0-rc.5",
"@cliffy/table": "jsr:@cliffy/table@1.0.0-rc.5",
Expand Down
Loading
Loading