-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from valory-xyz/fix/git-workflow
Fix git workflow
- Loading branch information
Showing
15 changed files
with
25,715 additions
and
73 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Autonolas registry | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'apps/autonolas-registry/**' | ||
pull_request: | ||
paths: | ||
- 'apps/autonolas-registry/**' | ||
|
||
jobs: | ||
build: | ||
continue-on-error: False | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install modules | ||
run: yarn | ||
- run: git branch --track main origin/main | ||
- name: Run ESLint | ||
run: yarn nx lint autonolas-registry | ||
# - name: Run Test | ||
# run: yarn nx test autonolas-registry | ||
scan: | ||
name: gitleaks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.17.7' | ||
- run: | | ||
wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ | ||
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ | ||
sudo install gitleaks /usr/bin && \ | ||
gitleaks detect --source apps/autonolas-registry --report-format json --report-path autonolas-registry.json --exit-code 0 -v |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# TODO: figure out how to trigger workflow from vercel for nx | ||
|
||
name: Tokenomics | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'apps/tokenomics/**' | ||
pull_request: | ||
paths: | ||
- 'apps/tokenomics/**' | ||
|
||
jobs: | ||
build: | ||
continue-on-error: False | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install modules | ||
run: yarn | ||
- run: git branch --track main origin/main | ||
- name: Run ESLint | ||
run: yarn nx lint tokenomics | ||
- name: Run Test | ||
run: yarn nx test tokenomics | ||
scan: | ||
name: gitleaks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.17.7' | ||
- run: | | ||
wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ | ||
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ | ||
sudo install gitleaks /usr/bin && \ | ||
gitleaks detect --source apps/tokenomics --report-format json --report-path tokenomics.json --exit-code 0 -v |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
const { resolve } = require('path'); | ||
const { pathsToModuleNameMapper } = require('ts-jest'); | ||
const { compilerOptions } = require('../../tsconfig.base.json'); | ||
|
||
module.exports = { | ||
verbose: true, | ||
setupFilesAfterEnv: ['./jest.setup.js'], | ||
displayName: 'tokenomics', | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'jsdom', | ||
moduleDirectories: ['node_modules'], | ||
moduleNameMapper: { | ||
'\\.(css|less|sass|scss)$': '<rootDir>/__mocks__/styleMock.js', | ||
'\\.(gif|ttf|eot|svg)$': '<rootDir>/__mocks__/fileMock.js', | ||
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: resolve(__dirname, '../..') }), | ||
'^util/(.*)$': '<rootDir>/util/$1', | ||
'^common-util/(.*)$': '<rootDir>/common-util/$1', | ||
'^components/(.*)$': '<rootDir>/components/$1', | ||
'^images/(.*)$': '<rootDir>/public/images/$1', | ||
'^store/(.*)$': '<rootDir>/store/$1', | ||
}, | ||
testEnvironment: 'jsdom', | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
transform: { | ||
'^.+\\.[tj]sx?$': ['ts-jest', { | ||
presets: ['@nx/next/babel'], | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
useESM: true, | ||
}], | ||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', | ||
}, | ||
coverageDirectory: '../../coverage/apps/tokenomics', | ||
collectCoverageFrom: [ | ||
'common-util/**/*.{js,jsx}', | ||
'components/**/*.{js,jsx}', | ||
|
||
// ABI will change frequently on backend deployment hence avoiding. | ||
'!common-util/AbiAndAddresses/*.{js,jsx}', | ||
|
||
// Contract objects | ||
'!common-util/Contracts/*.{js,jsx}', | ||
|
||
// styles are not required to be tested | ||
'!common-util/**/styles.{js,jsx}', | ||
'!components/**/styles.{js,jsx}', | ||
'!components/GlobalStyles/*.{js,jsx}', | ||
|
||
// Index page | ||
'!components/index/.jsx', | ||
], | ||
}; |
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.