feat: moveFunds procedure #80
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [master, beta, alpha, confidential-assets] | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
jobs: | |
lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: install dependencies | |
run: yarn --frozen-lockfile | |
- name: lint | |
run: yarn lint | |
test: | |
name: Testing | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
shard: [1, 2, 3, 4, 5] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: install dependencies | |
run: yarn --frozen-lockfile | |
- name: test | |
env: | |
NODE_OPTIONS: '--max-old-space-size=8192' | |
run: yarn test --runInBand --shard=${{ matrix.shard }}/${{ strategy.job-total }} | |
- name: Rename coverage to shard coverage | |
run: | | |
mv coverage/clover.xml coverage/clover-${{matrix.shard}}.xml | |
mv coverage/lcov.info coverage/lcov-${{matrix.shard}}.info | |
mv coverage/coverage-final.json coverage/coverage-${{matrix.shard}}.json | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-artifacts | |
path: coverage/ | |
sonar: | |
name: Merge coverage and SonarCloud scan | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-artifacts | |
path: coverage | |
- name: Process Coverage | |
run: npx nyc report --reporter lcov --reporter text --reporter clover -t coverage | |
- name: sonarcloud scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: geekyeggo/delete-artifact@v1 | |
with: | |
name: coverage-artifacts | |
failOnError: false | |
release: | |
name: Building and releasing project | |
runs-on: ubuntu-latest | |
needs: [lint, sonar] | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: install dependencies | |
run: yarn --frozen-lockfile | |
- name: build | |
run: | | |
yarn build:ts | |
sed 's/dist\//.\//' package.json > dist/package.json | |
cp README.md dist/README.md | |
cp -R node_modules dist/node_modules | |
- name: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
NPM_TOKEN: ${{ secrets.ASSOCIATION_NPM_TOKEN }} | |
run: | | |
cd dist | |
yarn --frozen-lockfile | |
yarn semantic-release | |
check-fast-forward: | |
name: Check if fast forwarding is possible | |
runs-on: ubuntu-latest | |
needs: [lint, sonar] | |
if: github.event_name == 'pull_request' | |
permissions: | |
contents: read | |
# We appear to need write permission for both pull-requests and | |
# issues in order to post a comment to a pull request. | |
pull-requests: write | |
issues: write | |
steps: | |
- name: Checking if fast forwarding is possible | |
uses: sequoia-pgp/fast-forward@v1 | |
with: | |
merge: false | |
# To reduce the workflow's verbosity, use 'on-error' | |
# to only post a comment when an error occurs, or 'never' to | |
# never post a comment. (In all cases the information is | |
# still available in the step's summary.) | |
comment: never |