Remove test data files for Maliheh and place-time-use #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: transform-xml-to-json | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
include: | |
- os: ubuntu-latest | |
PLATFORM: Linux-x86_64 | |
# - os: ubuntu-latest | |
# PLATFORM: Linux-x86_64 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Setup node and its dependencies | |
shell: bash -l {0} | |
run: | | |
export NVM_VERSION=0.39.0 | |
export NODE_VERSION=18.17.0 | |
export NPM_VERSION=8.5.5 | |
export NVM_DIR="$HOME/.nvm" | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash | |
echo "Setting up the variables to run nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
echo "Installing the correct node version" | |
nvm install $NODE_VERSION | |
echo "Check the version of npm" | |
CURR_NPM_VERSION=`npm --version` | |
if [ $CURR_NPM_VERSION != $NPM_VERSION ]; | |
then | |
echo "Invalid npm version, expected $NPM_VERSION, got $CURR_NPM_VERSION" | |
npm install npm@$NPM_VERSION | |
fi | |
npm install -g [email protected] | |
npm install enketo-transformer | |
npm install libxslt | |
- name: Run the transformer script | |
shell: bash -l {0} | |
run: | | |
node . | |
pwd | |
ls -lha | |
- name: Commit | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add data-json | |
git commit --no-verify -m 'Update data-json' || echo "No changes to commit" | |
git push || echo "No changes to commit" |