Updating CI and codeowners

This commit is contained in:
Jamie Hewitt 2022-08-25 18:52:07 +03:00
parent 71080e8827
commit 6a32531cfc
6 changed files with 87 additions and 2 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
* @jamiehewitt15 @kremalicious

8
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
time: '03:00'
timezone: Europe/Berlin

48
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: 'CI'
on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache node_modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
- run: npm ci
- run: npm run lint
test_integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache node_modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
- run: npm ci
- run: npm run test:integration

27
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: 'Publish'
on:
push:
tags:
- '**'
jobs:
npm:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: https://registry.npmjs.org/
- run: npm ci
# pre-releases, triggered by `next` as part of git tag
- run: npm publish --tag next
if: ${{ contains(github.ref, 'next') }}
# production releases
- run: npm publish
if: ${{ !contains(github.ref, 'next') }}

View File

@ -9,7 +9,8 @@
"clean": "rm -rf ./dist",
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
"test:format": "npm run format && npm run lint",
"test": "ts-mocha -p test/tsconfig.json --exit test/**/*.test.ts",
"test:integration": "ts-mocha -p test/tsconfig.json --exit test/**/*.test.ts",
"test": "test:format && test:integration",
"type-check": "tsc --noEmit"
},
"dependencies": {

View File

@ -92,7 +92,7 @@ describe('Testing ENS proxy API endpoints', function () {
assert(response.data.profile.links[2].key === 'com.github')
})
// Tests with incorrect address
// Tests with incorrect address or name
it('Requesting address should return status 200 with invalid name', async () => {
server = createServer(addressApi)