From 8e98c1c63bbd980ba9d6e87d9d4c5fc6106c9335 Mon Sep 17 00:00:00 2001 From: Joxit Date: Tue, 23 May 2023 05:19:51 +0200 Subject: [PATCH] ci: add test step and create PR workflow --- .github/workflows/main.yml | 2 ++ .github/workflows/pull_request.yml | 18 ++++++++++++++++++ .github/workflows/release.yml | 4 +++- src/components/docker-registry-ui.riot | 1 - 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c816c72..df39aa7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,8 @@ jobs: - uses: actions/checkout@v2 - name: Install dependencies run: npm install + - name: Run tests + run: npm test - name: Build the interface run: npm run build - name: Set up QEMU diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..9ab1cf6 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,18 @@ +name: Run tests on PRs and branches + +on: + pull_request: + push: + branches-ignore: [ main, master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: npm install + - name: Run tests + run: npm test + - name: Build the interface + run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7356b47..8dfaab1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: - tags: '*' + tags: ['*'] jobs: build: @@ -13,6 +13,8 @@ jobs: fetch-depth: 0 - name: Install dependencies run: npm install + - name: Run tests + run: npm test - name: Build the interface run: npm run build - name: Major tag diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot index 8b8efe5..8209856 100644 --- a/src/components/docker-registry-ui.riot +++ b/src/components/docker-registry-ui.riot @@ -219,7 +219,6 @@ along with this program. If not, see . return stripHttps(url); }, notifySnackbar(message, isError) { - console.log(message); if (typeof message === 'string') { this.update({ snackbarMessage: message,