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

ci: Replace web validator with schema version and link to subdirectory build of the legacy validator #1929

Merged
merged 5 commits into from
Apr 22, 2024
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
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ jobs:
name: Clean and remove bids-validator files
command: git reset . && git clean --force -d --exclude bids-validator-web/out
- run:
name: Move build into root directory
command: mv bids-validator-web/out/* .
name: Move build into legacy directory
command: mv bids-validator-web/out/ legacy
- run:
name: Remove files not related to build
command: rm -r bids-validator bids-validator-web node_modules
Expand All @@ -200,14 +200,14 @@ jobs:
- run: git status
- run:
name: Commit updates
command: git add . && git commit --allow-empty --no-verify -m "Circle CI - Generate validator demo with version $CIRCLE_TAG [ci skip]"
command: git add legacy && git commit --allow-empty --no-verify -m "Circle CI - Generate validator demo with version $CIRCLE_TAG [ci skip]"
- run: git push origin gh-pages -f
- save_cache:
key: npm-deps-{{ checksum "package.json" }}-{{ checksum "./bids-validator/package.json" }}-{{ checksum "./bids-validator-web/package.json" }}-v1
paths:
- ./node_modules
- store_artifacts:
path: ~/
path: ~/legacy
workflows:
version: 2
build-deploy:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/schema_web_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Schema validator web deploy

on:
push:
branches: [master]
tags: ['*']
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno task build
working-directory: ./web
- uses: actions/upload-artifact@v4
with:
name: web
path: web/dist
41 changes: 41 additions & 0 deletions .github/workflows/schema_web_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Schema validator web deploy

on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno task build
working-directory: ./web
- uses: actions/upload-artifact@v4
with:
name: web
path: web/dist
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
1 change: 1 addition & 0 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function App() {
Note: Selecting a dataset only performs validation. Files are never
uploaded.
</div>
<div>Previous version of the BIDS validator (non-schema) available <a href="https://bids-standard.github.io/bids-validator/legacy">here.</a></div>
</>
)
}
Expand Down
Loading