Skip to content

Commit b96ab87

Browse files
committed
Update CI workflow: fix indentation and update Node.js and npm versions
1 parent 68cfb1e commit b96ab87

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: transform-xml-to-json
44
# events but only for the master branch
55
on:
66
push:
7-
branches: [ main ]
7+
branches: [main]
88
pull_request:
9-
branches: [ main ]
9+
branches: [main]
1010

1111
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1212
jobs:
@@ -18,51 +18,51 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest]
2020
include:
21-
- os: ubuntu-latest
22-
PLATFORM: Linux-x86_64
21+
- os: ubuntu-latest
22+
PLATFORM: Linux-x86_64
2323
# - os: ubuntu-latest
2424
# PLATFORM: Linux-x86_64
2525

2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
28-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29-
- uses: actions/checkout@v2
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v2
3030

31-
- name: Setup node and its dependencies
32-
shell: bash -l {0}
33-
run: |
34-
export NVM_VERSION=0.39.0
35-
export NODE_VERSION=18.17.0
36-
export NPM_VERSION=8.5.5
37-
export NVM_DIR="$HOME/.nvm"
38-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
39-
echo "Setting up the variables to run nvm"
40-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
41-
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
42-
echo "Installing the correct node version"
43-
nvm install $NODE_VERSION
44-
echo "Check the version of npm"
45-
CURR_NPM_VERSION=`npm --version`
46-
if [ $CURR_NPM_VERSION != $NPM_VERSION ];
47-
then
48-
echo "Invalid npm version, expected $NPM_VERSION, got $CURR_NPM_VERSION"
49-
npm install npm@$NPM_VERSION
50-
fi
51-
npm install -g npm@6.14
52-
npm install enketo-transformer
53-
npm install libxslt
31+
- name: Setup node and its dependencies
32+
shell: bash -l {0}
33+
run: |
34+
export NVM_VERSION=0.39.0
35+
export NODE_VERSION=22.13.0
36+
export NPM_VERSION=11.0.0
37+
export NVM_DIR="$HOME/.nvm"
38+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
39+
echo "Setting up the variables to run nvm"
40+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
41+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
42+
echo "Installing the correct node version"
43+
nvm install $NODE_VERSION
44+
echo "Check the version of npm"
45+
CURR_NPM_VERSION=`npm --version`
46+
if [ $CURR_NPM_VERSION != $NPM_VERSION ];
47+
then
48+
echo "Invalid npm version, expected $NPM_VERSION, got $CURR_NPM_VERSION"
49+
npm install npm@$NPM_VERSION
50+
fi
51+
npm install -g npm@11.0.0
52+
npm install enketo-transformer
53+
npm install libxslt
5454
55-
- name: Run the transformer script
56-
shell: bash -l {0}
57-
run: |
58-
node .
59-
pwd
60-
ls -lha
61-
62-
- name: Commit
63-
run: |
64-
git config --global user.name 'GitHub Action'
65-
git config --global user.email 'action@github.com'
66-
git add data-json
67-
git commit --no-verify -m 'Update data-json' || echo "No changes to commit"
68-
git push || echo "No changes to commit"
55+
- name: Run the transformer script
56+
shell: bash -l {0}
57+
run: |
58+
node .
59+
pwd
60+
ls -lha
61+
62+
- name: Commit
63+
run: |
64+
git config --global user.name 'GitHub Action'
65+
git config --global user.email 'action@github.com'
66+
git add data-json
67+
git commit --no-verify -m 'Update data-json' || echo "No changes to commit"
68+
git push || echo "No changes to commit"

0 commit comments

Comments
 (0)