Browse Source

Merge pull request #1 from Ahlem-fahem/build_and_test_config

Build and test config
main
Ahlem Fahem 5 years ago
committed by GitHub
parent
commit
8390f1adcf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 82
      .circleci/config.yml
  2. 8
      .idea/.gitignore
  3. 9
      .idea/misc.xml
  4. 8
      .idea/modules.xml
  5. 9
      .idea/my-awesome-project-finale.iml
  6. 6
      .idea/vcs.xml
  7. 15889
      package-lock.json
  8. 1
      src/App.js

82
.circleci/config.yml

@ -1,7 +1,85 @@
executors:
node:
docker:
- image: circleci/node:10.14.2
aliases:
restore_cache: &restore_cache
restore_cache:
keys:
- yarn-cache-netlify-{{ checksum "yarn.lock" }}
install_node_modules: &install_node_modules
run:
command: yarn install
check_formatting: &check_formatting
run:
command: yarn add --dev --exact prettier && yarn format:write && yarn format:check
save_cache: &save_cache
save_cache:
key: yarn-cache-netlify-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
version: 2.1 version: 2.1
orbs: orbs:
node: circleci/node@3.0.0 node: circleci/node@3.0.0
jobs:
test:
executor: node
steps:
- checkout
- <<: *restore_cache
- <<: *install_node_modules
- <<: *save_cache
- run:
name: Test
command: yarn run test
build:
executor: node
steps:
- checkout
- <<: *check_formatting
- <<: *restore_cache
- <<: *install_node_modules
- run:
name: Build
command: yarn run build
- persist_to_workspace:
root: ./
paths:
- public
deploy:
executor: node
steps:
- checkout
- attach_workspace:
at: ./
- <<: *restore_cache
- <<: *install_node_modules
- run:
name: Install netlify-cli
command: sudo yarn install -g --silent netlify-cli
- run:
name: Deploy to Netlify
command: netlify deploy --dir=./public -p
workflows: workflows:
node-tests:
test_build_and_deploy:
jobs: jobs:
- node/test
- test:
filters:
branches:
ignore:
- gh-pages
- build:
requires:
- test
- deploy:
requires:
- build
filters:
branches:
only: main

8
.idea/.gitignore

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../../../:\Users\pc\Desktop\my-awesome-project-finale\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

9
.idea/misc.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="JSX" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" default="false" project-jdk-name="15" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/my-awesome-project-finale.iml" filepath="$PROJECT_DIR$/.idea/my-awesome-project-finale.iml" />
</modules>
</component>
</project>

9
.idea/my-awesome-project-finale.iml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

15889
package-lock.json
File diff suppressed because it is too large
View File

1
src/App.js

@ -1,5 +1,6 @@
import logo from './logo.svg'; import logo from './logo.svg';
import './App.css'; import './App.css';
import React from 'react';
function App() { function App() {
return ( return (

Loading…
Cancel
Save