-
Notifications
You must be signed in to change notification settings - Fork 7
80 lines (74 loc) · 2.03 KB
/
deno_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: Deno build
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@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: ./build.ts
working-directory: ./bids-validator
- uses: actions/upload-artifact@v3
with:
name: main
path: bids-validator/dist/validator/main.js
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
fail-fast: false
defaults:
run:
working-directory: ./bids-validator
steps:
- uses: actions/checkout@v3
- uses: denoland/[email protected]
with:
deno-version: v1.x
- name: Get bids-examples
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- run: deno test --allow-all src/
deploy:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' && github.repository_owner == 'bids-standard'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PUSH_TOKEN }}
- name: Set credentials
run: |
git config --global user.name "BIDS-Bot"
git config --global user.email "[email protected]"
- name: Save describe stamp
run: echo VERSION=$( git describe ) >> $GITHUB_ENV
- name: Checkout orphan
run: |
git checkout --orphan deno-build
git rm -rf .
- uses: actions/download-artifact@v3
with:
name: main
path: main
- name: Commit to new branch
run: |
mv main/main.js .
git add main.js
git commit -m "BLD: $VERSION [skip ci]"
- name: Force push
run: git push origin --force deno-build