Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part11/ex.3 #852

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-runtime"]
}
}
}
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
webpack.config.js
node_modules/
dist/
webpack.config.js
node_modules/
dist/
98 changes: 49 additions & 49 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest/globals": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react", "jest"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"eqeqeq": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": [
"error", "always"
],
"arrow-spacing": [
"error", { "before": true, "after": true }
],
"no-console": "error",
"react/prop-types": 0
}
}
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest/globals": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react", "jest"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"eqeqeq": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": [
"error", "always"
],
"arrow-spacing": [
"error", { "before": true, "after": true }
],
"no-console": "error",
"react/prop-types": 0
}
}
11 changes: 11 additions & 0 deletions .github/workflows/hello.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: hello world!
on:
push:
branches:
- master
jobs:
hello_world_job:
runs-on: ubuntu-latest
steps:
- name: say hello
run: echo "Hello World!"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist/
dist/
node_modules/
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Full Stack open CI/CD

This repository is used for the CI/CD module of the Full stack open course

Fork the repository to complete course exercises

## Commands

Start by running `npm install` inside the project folder

`npm start` to run the webpack dev server
`npm test` to run tests
`npm run eslint` to run eslint
`npm run build` to make a production build
`npm run start-prod` to run your production build
# Full Stack open CI/CD
This repository is used for the CI/CD module of the Full stack open course
Fork the repository to complete course exercises
## Commands
Start by running `npm install` inside the project folder
`npm start` to run the webpack dev server
`npm test` to run tests
`npm run eslint` to run eslint
`npm run build` to make a production build
`npm run start-prod` to run your production build
22 changes: 11 additions & 11 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const express = require("express");
const app = express();

// Heroku dynamically sets a port
const PORT = process.env.PORT || 5000;

app.use(express.static("dist"));

app.listen(PORT, () => {
console.log("server started on port 5000");
});
const express = require("express");
const app = express();
// Heroku dynamically sets a port
const PORT = process.env.PORT || 5000;
app.use(express.static("dist"));
app.listen(PORT, () => {
console.log("server started on port 5000");
});
30 changes: 30 additions & 0 deletions exercise1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### No.1

in python ,
for testing , there are options. pytest is a popular testing framework
unittest in junit of java style is another option
for linting, pylint is widely used for checking the python code against coding standards and
conventions.
although not a linting tool, but Black is a popular code formatter that automatically reformats
the code to adhere to standards.
while python apps dont have a build steps necessarily, for building a package i'd say pip (?)

### No.2

Gitlab CI/CD
Azure pipeline
Travis CI
Circle CI
..

### No.3

as mentioned in material , for the small to medium projects the better option would be
a cloud-hosted solution (github actions here), however this was the only option i had
as i don't have the physical server at my disposal at the time of doing this to have a
self-hosted server, and even if i did, the configuration of Jenkins was'nt the thing i
would have do. too much work where in github actions everything is ready.
However, there are so many things to consider , and both self-hosted and cloud-hosted
solutions got their advantages and disadvantages, but because of lack of infrastructure
and the knowledge to configure a self-hosted automation server, the right better option
is the cloud-hosted.
Loading