Skip to content

compare with current default #6233

compare with current default

compare with current default #6233

Workflow file for this run

name: Node CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
node-version: [20.x]
mongodb-version: ['7.0']
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Check Hash
run: |
newhash=$(find ./ZelBack -type f -exec md5sum {} + | awk '{print $1}' | LC_ALL=C sort | md5sum | awk '{printf $1}')
echo $newhash
echo NEW_HASH=$newhash >> $GITHUB_ENV
- name: Get current hashes
run: |
mkdir hashes
wget 'https://raw.githubusercontent.com/RunOnFlux/fluxhashes/master/src/hashes/hashes.js' -P hashes
hashfile=`cat hashes/hashes.js | sed "s/return/_/gi" | sed "s/\n/_/gi"`
echo HASH_FILE=$hashfile >> $GITHUB_ENV
- name: Show hashes
run: |
echo $HASH_FILE
echo $NEW_HASH
- name: Patch hashes
if: ${{ !contains(env.HASH_FILE, env.NEW_HASH) }}
run: |
newhash=$(find ./ZelBack -type f -exec md5sum {} + | awk '{print $1}' | LC_ALL=C sort | md5sum | awk '{printf $1}')
sed -i "s/ ];/ '$newhash',\n ];/gi" hashes/hashes.js
tail -n 200 hashes/hashes.js
- name: Push hashes to fluxhashes
if: ${{ !contains(env.HASH_FILE, env.NEW_HASH) }}
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: "hashes"
destination-github-username: "RunOnFlux"
destination-repository-name: "fluxhashes"
user-email: runonfluxbot@gmail.com
target-branch: master
target-directory: src/hashes/
- name: install flux and flux benchmark daemons
run: |
echo 'deb https://apt.runonflux.io/ '$(lsb_release -cs)' main' | sudo tee /etc/apt/sources.list.d/flux.list
gpg --keyserver keyserver.ubuntu.com --recv 4B69CA27A986265D
gpg --export 4B69CA27A986265D | sudo apt-key add -
sudo apt-get update
sudo apt-get install flux
sudo apt-get install fluxbench
- name: install syncthing
run: |
sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo 'deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable' | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt install ca-certificates -y > /dev/null 2>&1
sudo apt-get update -y
sudo apt-get install screen syncthing -y
- name: run syncthing
run: |
screen -S Bsyncthing -dm syncthing
- name: print versions
run: |
node -v
npm -v
- name: npm install
run: npm i
- name: configure
run: npm run ciconfig
- name: prebuild
run: npm run prebuild
- name: build home
run: npm run homebuild
- name: Test suite
run: |
npm run test:zelback
npm run test:zelback:unit
env:
CI: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Push docs to other repo # Push services directory from RunOnFlux/flux to RunOnFlux/fluxjsdocs repo to build JSDocs separately.
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: "ZelBack/src/services"
destination-github-username: "RunOnFlux"
destination-repository-name: "fluxjsdocs"
user-email: runonfluxbot@gmail.com
target-branch: master
target-directory: services/