76 lines (60 loc) · 1.78 KB
/
javascript-typescript.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
name: JavaScript,TypeScript
on: [push,pull_request]
jobs:
build-test-deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: 'Free up disk space'
run: |
# Workaround for https://github.com/actions/virtual-environments/issues/709
df -h
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /usr/share/dotnet/
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Pull latest Docker images
run: |
./src/docker/pull.sh
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install packages
run: |
npm ci
- name: Build
run: |
npm run build
- name: Lint tests
run: |
npm run test:lint
- name: Node tests
run: |
npm run test:node
- name: Browser tests
run: |
# Allow writing test/output.html
sudo chmod 777 test
# To debug locally, run `./test/run.sh -d`
./test/run.sh
- name: Test building a pipeline
run: |
cd test/pipelines/median-filter-pipeline
node ../../../src/itk-wasm-cli.js build -i itkwasm/emscripten:latest .
rm -rf web-build
node ../../../src/itk-wasm-cli.js build -i itkwasm/wasi:latest .
rm -rf web-build
cd -
- name: Publish task
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "itk+community@discourse.itk.org"
npx semantic-release