Skip to content

Commit

Permalink
Merge pull request #5 from fga-eps-mds/feature/47-continuous-integration
Browse files Browse the repository at this point in the history
#47 Configurar integração contínua
  • Loading branch information
fabiola-m authored Sep 30, 2019
2 parents 00917e5 + 2d08e36 commit fae56f7
Show file tree
Hide file tree
Showing 5 changed files with 3,343 additions and 145 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

name: CI

on:
pull_request:
branches:
- master
- develop
- release/*

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: setup environment
run: docker-compose up -d --build
- name: Run tests
run: docker exec acacia-frontend npm run test:unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage/clover.xml
flags: unittests
name: codecov-umbrella
32 changes: 32 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
transformIgnorePatterns: [
'/node_modules/'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
testURL: 'http://localhost/',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
],
collectCoverage: true,
collectCoverageFrom: ["**/src/**.{js,vue}", "!**/node_modules/**", "!**src/main.js**", "!**src/router.js**"]
}
Loading

0 comments on commit fae56f7

Please sign in to comment.