Skip to content

Commit

Permalink
Add 'pull_reqest' workflow and 'test' steps (#681)
Browse files Browse the repository at this point in the history
* Add pull_reqest: ci trigger

* Limit actions push branches ('master', 'en')

* Add pull request workflow

* Rm pull_request condition from the docker-image workflow

* Rm testNodeVersionDockerfile

We no more use node build in Dockerfile

* Add test step

* Put back testNodeVersionDockerfile, but not for CI Dockerfiles

* Put back Gruntfile from master

* Rm test for frontend.Dockerfile

* Add test step to the Docker workflow

* Update .github/workflows/pull-request.yml

Co-authored-by: Ruslan Kabalin <[email protected]>

---------

Co-authored-by: Ruslan Kabalin <[email protected]>
  • Loading branch information
aeifn and kabalin authored May 14, 2024
1 parent 2fb8d85 commit 159f819
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Docker Image CI
on:
push:
branches:
- '**'
- 'master'
- 'en'
tags:
- 'v*'
workflow_dispatch:
Expand All @@ -28,10 +29,14 @@ jobs:
run: |
npm version --no-git-tag-version $(node -p "require('./package.json').version")-${GITHUB_SHA::8}
- name: Install dependencies
run: npm ci

- name: Test
run: npm run test

- name: Build
run: |
npm ci
npm run build
run: npm run build

#- name: Sentry
# env:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull request CI test

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.10.0

- name: Install dependencies
run: npm ci

- name: Test
run: npm run test

- name: Build
run: npm run build
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ module.exports = function (grunt) {
'exec:testNodeVersion:.nvmrc',
'exec:testNodeVersionDockerfile:./.docker/Dockerfile',
'exec:testNodeVersionDockerfile:./.docker/backend.Dockerfile',
'exec:testNodeVersionDockerfile:./.docker/frontend.Dockerfile',
'eslint',
'stylelint',
'exec:jest',
Expand Down

0 comments on commit 159f819

Please sign in to comment.