Skip to content

Commit

Permalink
Activate GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy authored Jul 13, 2021
1 parent 742c2cb commit fa45dff
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# 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:
test-front-end:
env:
working-directory: ./geonode_mapstore_client/client
runs-on: ubuntu-latest
steps:
- name: "checking out"
uses: actions/checkout@v2

- name: "setting up npm"
uses: actions/setup-node@v2
with:
node-version: '12.x'

############
# CACHING
##########
- name: "cache node modules"
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
###############
# NPM CHECKS
#############
- name: npm install
run: npm install

- name: ESlint
run: npm run lint

- name: Unit Tests
run: npm test

build:
env:
working-directory: ./geonode_mapstore_client/client
runs-on: ubuntu-latest
steps:
- name: "checking out"
uses: actions/checkout@v2

###########
# SET UP
#########
- name: "setting up npm"
uses: actions/setup-node@v2
with:
node-version: '12.x'

############
# CACHING
##########
- name: "cache node modules"
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
###############
# NPM CHECKS
#############
- name: npm install
run: npm install

- name: compile
run: npm run compile

0 comments on commit fa45dff

Please sign in to comment.