Skip to content

Merge branch 'dev2023-12' of https://github.com/RIKEN-RCCS/OPEN-WHEEL… #181

Merge branch 'dev2023-12' of https://github.com/RIKEN-RCCS/OPEN-WHEEL…

Merge branch 'dev2023-12' of https://github.com/RIKEN-RCCS/OPEN-WHEEL… #181

Workflow file for this run

name: run UT
on:
push:
branches:
- '**'
- '!master'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
services:
testbed:
image: naoso5/openpbs
ports:
- 4000:22
env:
WHEEL_USE_HTTP: 1
WHEEL_TEST_REMOTEHOST: testServer
WHEEL_TEST_REMOTE_PASSWORD: passw0rd
TZ: JST-9
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- run: mkdir -p ~/.wheel
- run: >
echo '[{
"name": "testServer",
"host": "localhost",
"path": "/home/testuser",
"keyFile": null,
"username": "testuser",
"numJob": 5,
"port": 4000,
"id": "dummy-id",
"jobScheduler": "PBSPro",
"renewInterval": 0,
"renewDelay": 0,
"statusCheckInterval": 10,
"maxStatusCheckError": 10,
"readyTimeout": 5000
}]' > ~/.wheel/remotehost.json
- run: cat ~/.wheel/remotehost.json
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test
working-directory: ./server
- run: echo "VERSION_NUMBER=`date '+%Y-%m%d-%H%M%S'`" >>$GITHUB_ENV
- run: cat server/app/db/version.json
- name: update version.json
id: create-json
uses: jsdaniell/[email protected]
with:
dir: "server/app/db"
name: "version.json"
json: '{"version": "${{ env.VERSION_NUMBER }}" }'
- run: cat server/app/db/version.json
- name: commit and push version.json
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config user.name 'version-number-updater[bot]'
git config user.email '[email protected]'
git add server/app/db/version.json
git commit -m '[skip ci] update version number'
git push origin HEAD:${GITHUB_REF}
backup:
needs: ["test"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: echo push to ${BRANCH_NAME}
- name: push to gitlab for backup
env:
BRANCH_NAME: ${{ github.ref_name }}
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
run: |
git push https://oauth2:${GITLAB_ACCESS_TOKEN}@gitlab.com/aicshud/WHEEL.git HEAD:${BRANCH_NAME}