From 27e061c355173db7c9df924594d7158fa7be7965 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Thu, 10 Jun 2021 11:02:24 +0530 Subject: [PATCH 1/2] setup: GitHub actions for tests and remove Travis CI --- .github/workflows/tests.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 34 ---------------------------------- README.md | 4 ++-- 3 files changed, 28 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..3651f616d --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,26 @@ +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7289cfde0..000000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -# == INSTRUCTIONS FOR SETTING UP TRAVIS == -# -# 1. Find this repository in your Travis-CI dashboard. -# open settings and add an environment variable called -# GITHUB_ACCESS_TOKEN and set it to your personal access token.addons: -# See: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line -# -# **DO NOT TURN ON 'Display value in build log'!!!!** -# -# 2. Push the code to the repository. - -language: node_js -node_js: - - lts/* - -os: linux - -cache: npm - -branches: - only: - - main - -install: - - npm ci - -before_script: - - npm run build # use nuxt build and start to run tests - -script: - - npm test - -notifications: - webhooks: https://www.travisbuddy.com diff --git a/README.md b/README.md index 3c2a8c435..492070454 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

-[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen?logo=github)](CODE_OF_CONDUCT.md) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fhoppscotch.io&logo=hoppscotch)](https://hoppscotch.io) [![Travis Build Status](https://img.shields.io/travis/com/hoppscotch/hoppscotch/main?logo=Travis)](https://travis-ci.com/hoppscotch/hoppscotch) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fhoppscotch.io%2F)](https://twitter.com/share?text=%F0%9F%91%BD%20Hoppscotch%20%E2%80%A2%20Open%20source%20API%20development%20ecosystem%20-%20Helps%20you%20create%20requests%20faster,%20saving%20precious%20time%20on%20development.&url=https://hoppscotch.io&hashtags=hoppscotch&via=hoppscotch_io) +[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen?logo=github)](CODE_OF_CONDUCT.md) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fhoppscotch.io&logo=hoppscotch)](https://hoppscotch.io) ![Tests](https://github.com/hoppscotch/hoppscotch/actions/workflows/tests.yml/badge.svg) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fhoppscotch.io%2F)](https://twitter.com/share?text=%F0%9F%91%BD%20Hoppscotch%20%E2%80%A2%20Open%20source%20API%20development%20ecosystem%20-%20Helps%20you%20create%20requests%20faster,%20saving%20precious%20time%20on%20development.&url=https://hoppscotch.io&hashtags=hoppscotch&via=hoppscotch_io)

@@ -522,7 +522,7 @@ Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDU ## **Continuous Integration** -We use [Travis CI](https://travis-ci.com) for continuous integration. Check out our [Travis CI Status](https://travis-ci.com/hoppscotch/hoppscotch). +We use [GitHub Actions](https://github.com/features/actions) for continuous integration. Check out our [Build Workflows](https://github.com/hoppscotch/hoppscotch/actions). ## **Changelog** From af9c7e0aff550de8c6998062d44e5324afd83262 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Thu, 10 Jun 2021 19:26:03 +0530 Subject: [PATCH 2/2] feat: add FundOSS toast --- components/app/Header.vue | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/components/app/Header.vue b/components/app/Header.vue index e0fb80be8..af6b9b4df 100644 --- a/components/app/Header.vue +++ b/components/app/Header.vue @@ -212,34 +212,34 @@ export default { }) } - // let showAd = localStorage.getItem("showAd") === "no" - // if (!showAd) { - // setTimeout(() => { - // this.$toast.clear() - // this.$toast.show( - // "Sponsor us to support Hoppscotch open source project 💖
Whoosh this away to dismiss.
", - // { - // icon: "", - // duration: 0, - // theme: "toasted-ad", - // action: [ - // { - // text: "Sponsor", - // icon: "chevron_right", - // onClick: (_, toastObject) => { - // localStorage.setItem("showAd", "no") - // toastObject.goAway(0) - // window.open("https://github.com/sponsors/hoppscotch") - // }, - // }, - // ], - // onComplete() { - // localStorage.setItem("showAd", "no") - // }, - // } - // ) - // }, 8000) - // } + const showAd = localStorage.getItem("showAd") === "no" + if (!showAd) { + setTimeout(() => { + this.$toast.clear() + this.$toast.show( + "Sponsor us to support Hoppscotch open source project 💖
Whoosh this away to dismiss.
", + { + icon: "", + duration: 0, + theme: "toasted-ad", + action: [ + { + text: "Donate", + icon: "chevron_right", + onClick: (_, toastObject) => { + localStorage.setItem("showAd", "no") + toastObject.goAway(0) + window.open("https://fundoss.org/collective/hoppscotch") + }, + }, + ], + onComplete() { + localStorage.setItem("showAd", "no") + }, + } + ) + }, 6000) + } // let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes" // if (!showExtensionsToast) {