Skip to content

docs: modify README

docs: modify README #2

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Power-oracle-node-test
on:
push:
branches: [ "main" ]
paths:
- 'power-oracle-node/*'
pull_request:
branches: [ "main" ]
paths:
- 'power-oracle-node/*'
jobs:
orace-node-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install dependencies
run: |
cd ./power-oracle-node/backend
go mod tidy
- name: Copy config file to test dir
run: |
cd ./power-oracle-node/backend
cp ./abi/* ./config
cp ./abi/* ./contract
cp ./abi/* ./task
cp ./abi/* ./utils
cp ./abi/* ./service
- name: Inject github token to config.yaml
env:
GH_TOKEN: ${{ secrets.gh_token }}
uses: mikefarah/yq@master
with:
cmd: yq eval ".github.githubToken = strenv(GH_TOKEN)" -i ./power-oracle-node/backend/configuration.yaml
- name: Test
run: |
cd ./power-oracle-node/backend
go test -v ./...