Skip to content

Commit

Permalink
fix tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy committed Sep 9, 2022
1 parent f88a572 commit b67af10
Showing 1 changed file with 11 additions and 34 deletions.
45 changes: 11 additions & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# This is a basic workflow to help you get started with Actions

name: GeoNode Client CI (build)
name: GeoNode Client CI (tests)

concurrency:
group: "client_build"
cancel-in-progress: true
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the master branch
push:
# Triggers the workflow pull request events but only for the master branch
pull_request:
branches: [ master ]
paths:
- "geonode_mapstore_client/client/**"
- "!geonode_mapstore_client/client/version.txt"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_and_commit:
test-front-end:
env:
working-directory: ./geonode_mapstore_client/client
runs-on: ubuntu-latest
Expand All @@ -29,9 +25,6 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive

###########
# SET UP
#########
- name: "Setting up npm"
uses: actions/setup-node@v2
with:
Expand All @@ -53,33 +46,17 @@ jobs:
${{ runner.os }}-
###############
# NPM BUILD
# NPM CHECKS
#############
- name: "Run npm install"
run: npm install
working-directory: ${{env.working-directory}}

- name: "Run npm compile"
run: npm run compile
- name: "Run ESlint"
run: npm run lint
working-directory: ${{env.working-directory}}

###############
# COMMIT
#############
- name: "Stage files"
run: git add --all

- name: "Generate temp GitHub token"
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}

- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
base: "master"
title: "new client build"
body: "Automated client build from GeoNode Client CI"
- name: "Run Unit Tests"
run: npm test
working-directory: ${{env.working-directory}}

0 comments on commit b67af10

Please sign in to comment.