From 58e19e8007656b8f4b47b77f235af3e95adce48e Mon Sep 17 00:00:00 2001 From: Adam Bukowski Date: Fri, 12 Jan 2024 13:35:50 +0100 Subject: [PATCH 1/3] chore: add gh actions --- .github/workflows/perf.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ .travis.yml | 15 --------------- 3 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/perf.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml new file mode 100644 index 0000000..eb51379 --- /dev/null +++ b/.github/workflows/perf.yml @@ -0,0 +1,32 @@ +name: Run performance tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + cache: "npm" + + - name: Install dependencies + run: npm install + + - name: Test base performance + run: npm run perf /noop + + - name: Test nodesi performance + run: npm run perf /test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d8d4b1b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Run npm test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + cache: "npm" + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm run coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4f27e2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - "18" - -deploy: - provider: npm - email: kwasniewski.mateusz@gmail.com - api_key: - secure: Hrq6Te/CCiHIbnS3OoMdY5yCz22BBT/Rxyg+y3uKSIl4gNZen89SieBjZHV6P3zqitUI9Bof5pWCtIa+2W7WuR3H+Rac214M4CehvgAoo1VD1oms5lZ1Vqq/xotuf4QFg41d8Yo/Hn2aS+JHbpcdzgwEpeEKYqSswVIbnkdkGF0= - on: - tags: true - repo: Schibsted-Tech-Polska/nodesi - -after_success: - - npm run coverage From 526e5d95a4e564169ed15e9a00186010815c3723 Mon Sep 17 00:00:00 2001 From: Adam Bukowski Date: Fri, 12 Jan 2024 13:39:04 +0100 Subject: [PATCH 2/3] chore: fix branch name --- .github/workflows/perf.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index eb51379..1b483e5 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -3,10 +3,10 @@ name: Run performance tests on: push: branches: - - main + - master pull_request: branches: - - main + - master jobs: test: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8d4b1b..41b5f85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,10 @@ name: Run npm test on: push: branches: - - main + - master pull_request: branches: - - main + - master jobs: test: From 7e185d8c09b11752d39282fe86bd278d28b9c119 Mon Sep 17 00:00:00 2001 From: Adam Bukowski Date: Fri, 12 Jan 2024 13:42:12 +0100 Subject: [PATCH 3/3] chore: adjust npmignore file --- .npmignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 232d59b..229b673 100644 --- a/.npmignore +++ b/.npmignore @@ -6,8 +6,10 @@ npm-debug.log siege.log .nyc_output perf +perf.js test .jshintrc -.travis.yml .nvmrc .editorconfig +.github +*.tgz