Skip to content

Commit

Permalink
Merge pull request #4021 from iron-fish/staging
Browse files Browse the repository at this point in the history
STAGING -> MASTER
  • Loading branch information
mat-if authored Jul 5, 2023
2 parents 1ccdf95 + 7f35ed2 commit e27a127
Show file tree
Hide file tree
Showing 146 changed files with 16,390 additions and 869 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
name: Build ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.host }}
steps:
- name: Record CPU information
run: |
${{ contains(matrix.settings.host, 'ubuntu-') && 'cat /proc/cpuinfo' || '' }}
${{ contains(matrix.settings.host, 'macos-') && 'sysctl -a | grep machdep.cpu' || '' }}
${{ contains(matrix.settings.host, 'windows-') && 'Get-WmiObject -Class Win32_Processor -ComputerName.' || '' }}
- name: Check out Git repository
uses: actions/checkout@v3

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/check-pr-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Pull Requests should target Staging branch

on:
pull_request:
types: ['*']
branches:
- '**'

jobs:
check:
runs-on: ubuntu-latest
steps:
- if: ${{ contains(github.event.pull_request.base.ref, 'master') && !contains(github.event.pull_request.title, 'master') }}
run: |
echo 'Pull request has "master" base branch without the override keyword "master" in the PR Title'
echo 'This pull request probably meant to target "staging"'
exit 1
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ jobs:
- name: Run tests
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB

- name: Check for missing fixtures
run: |
if [[ $(git status | grep fixture) ]]; then
echo "New test fixtures have not been checked in, please check them in."
exit 1
fi
- name: Upload coverage
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
Expand Down Expand Up @@ -93,9 +100,13 @@ jobs:
- name: Run slow tests & coverage
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB

- name: Run import/export account tests
run: sudo apt-get update && sudo apt-get install -y expect && yarn build && cd ironfish-cli && yarn test:importexport
- name: Check for missing fixtures
run: |
if [[ $(git status | grep fixture) ]]; then
echo "New test fixtures have not been checked in, please check them in."
exit 1
fi
- name: Upload coverage
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
52 changes: 52 additions & 0 deletions .github/workflows/perf_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Performance Tests

on:
workflow_dispatch:
push:
branches:
- staging

permissions:
checks: write
contents: write

jobs:
testperf:
name: Perf Tests
runs-on: [self-hosted, macOS, ARM64]

steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.12.1'
cache: 'yarn'

- name: Install packages
run: yarn --non-interactive --frozen-lockfile

- name: Run perf tests
run: yarn test:perf:report

- name: Check for missing fixtures
run: |
if [[ $(git status | grep fixture) ]]; then
echo "New test fixtures have not been checked in, please check them in."
exit 1
fi
- name: Import to InfluxDB
if: contains(github.event_name, 'push')
env:
INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }}
INFLUX_ORG: 'fdcfe96f6c31245a'
INFLUX_HOST: 'https://us-east-1-1.aws.cloud2.influxdata.com'
run: |
for f in ironfish/test-reports/*.perf.csv; do
influx write --bucket ironfish-telemetry-mainnet --format=csv --file $f
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# testing
**/coverage
testdbs
**/test-reports

# production
**/build
Expand Down
Loading

0 comments on commit e27a127

Please sign in to comment.