Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5584c8c
added my first workflow
Sep 26, 2023
28f7e6e
Update hello.YAML
fadibenz Sep 26, 2023
f66ac31
Create main.yml
fadibenz Sep 26, 2023
fcaf0e9
Update and rename hello.YAML to hello.yml
fadibenz Sep 26, 2023
c922a75
Delete .github/workflows/main.yml
fadibenz Sep 26, 2023
49b7621
Update hello.yml
fadibenz Sep 26, 2023
4fa81d0
Update hello.yml
fadibenz Sep 26, 2023
2ad2b56
Update hello.yml
fadibenz Sep 26, 2023
569aaf8
Update hello.yml
fadibenz Sep 26, 2023
56581c7
Create pipeline.yml
fadibenz Sep 26, 2023
58eb99a
Changed eslint rules
Sep 26, 2023
b211a0e
Merge branch 'master' of https://github.com/fadibenz/full-stack-open-…
Sep 26, 2023
7fc8c4a
Update pipeline.yml
fadibenz Sep 26, 2023
fb0d3bf
Fixed PokemonPage bug
Sep 26, 2023
8838658
Merge branch 'master' of https://github.com/fadibenz/full-stack-open-…
Sep 26, 2023
042ff57
Update pipeline.yml
fadibenz Sep 28, 2023
54e143c
Added Cypress
Sep 28, 2023
02e73b2
Merge branch 'master' of https://github.com/fadibenz/full-stack-open-…
Sep 28, 2023
41881ce
Update pipeline.yml
fadibenz Oct 2, 2023
20fa1af
Update pipeline.yml
fadibenz Oct 2, 2023
0de940b
Update pipeline.yml
fadibenz Oct 2, 2023
74df718
Added pipeline for pull requests
fadibenz Oct 3, 2023
6eb2e27
Added a condition so only master branch is deployed
fadibenz Oct 3, 2023
f2b6eca
Testing pull_request pipeline
Oct 3, 2023
ca3e5cc
Testing pull_request pipeline
Oct 4, 2023
16efd80
Merge pull request #1 from fadibenz/pull_pipeline
fadibenz Oct 4, 2023
6268045
Added versioning to pipeline.yml
fadibenz Oct 4, 2023
92783a4
Fixed syntax error
fadibenz Oct 4, 2023
6bece8d
Update pipeline.yml
fadibenz Oct 4, 2023
b57c285
Update pipeline.yml
fadibenz Oct 4, 2023
f48f7df
Update pipeline.yml
fadibenz Oct 4, 2023
49cf2ad
Update pipeline.yml
fadibenz Oct 4, 2023
b8b2592
Update pipeline.yml
fadibenz Oct 4, 2023
f17d5b7
Update pipeline.yml
fadibenz Oct 4, 2023
df71f7a
Update pipeline.yml
fadibenz Oct 4, 2023
a21575d
Update pipeline.yml
fadibenz Oct 4, 2023
6112646
Merge pull request #2 from fadibenz/fadibenz-patch-1
fadibenz Oct 4, 2023
10e85cb
Adding condition to bumping version #skip
fadibenz Oct 4, 2023
f0cbe5d
Testing tag function
fadibenz Oct 4, 2023
9246894
Testing new tag action
fadibenz Oct 4, 2023
c87f22c
Update pipeline.yml
fadibenz Oct 4, 2023
c6da759
Merge pull request #3 from fadibenz/fadibenz-patch-1
fadibenz Oct 4, 2023
fe322bd
Added discord notifications
fadibenz Oct 4, 2023
6a6206e
Merge pull request #4 from fadibenz/fadibenz-patch-2
fadibenz Oct 4, 2023
0c343ed
Update pipeline.yml
fadibenz Oct 4, 2023
e940723
Merge pull request #5 from fadibenz/fadibenz-patch-3
fadibenz Oct 4, 2023
238c44d
Create health_check.yml
fadibenz Oct 4, 2023
ed97669
Merge pull request #6 from fadibenz/fadibenz-patch-4
fadibenz Oct 4, 2023
bf761cf
Update health_check.yml
fadibenz Oct 4, 2023
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
68 changes: 25 additions & 43 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest/globals": true
env: {
browser: true,
es6: true,
"jest/globals": true,
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
extends: ["eslint:recommended", "plugin:react/recommended"],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
"ecmaVersion": 2018,
"sourceType": "module"
ecmaVersion: 2018,
sourceType: "module",
},
"plugins": [
"react", "jest"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"eqeqeq": "error",
plugins: ["react", "jest"],
rules: {
indent: ["error", 2],
// "linebreak-style": [
// "error",
// "unix"
// ],
quotes: ["error", "double"],
semi: [2, "always"],
eqeqeq: "error",
"no-trailing-spaces": "error",
"object-curly-spacing": [
"error", "always"
],
"arrow-spacing": [
"error", { "before": true, "after": true }
],
"object-curly-spacing": ["error", "always"],
"arrow-spacing": ["error", { before: true, after: true }],
"no-console": "error",
"react/prop-types": 0
}
}
"react/prop-types": 0,
},
};
16 changes: 16 additions & 0 deletions .github/workflows/health_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: periodic health check

on:
push:
branches:
- master

jobs:
health_check:
runs-on: ubuntu-latest
steps:
- name: URL Health Check
uses: Jtalk/url-health-check-action@v3.2
with:
url: https://full-stack-open-pokedex-e5ki.onrender.com

24 changes: 24 additions & 0 deletions .github/workflows/hello.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Hello World!


on:
push:
branches:
- master

jobs:
hello_world_job:
runs-on: ubuntu-20.04

steps:
- name: Say hello
run: |
echo 'hello world'

- name: Now it is
run: |
date

- name: Directory content
run: |
ls -l
71 changes: 71 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: deployment pipeline

on:
push:
branches:
- master
pull_request:
branches: [master]
types: [opened, synchronize]


jobs:
simple_deployment_pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'

- name: install dependencies
run: npm install

- name: Check style
run: npm run eslint

- name: Build
run: npm run build

- name: test
run: npm test

- name: deploy
if: ${{ github.event_name == 'push' }}
uses: Bounceapp/render-action@0.7.1
with:
github-token: ${{ secrets.GIT_TOKEN }}
render-token: ${{ secrets.RENDER_TOKEN }}
service-id: srv-ckaqq2mgtj9c73a04rv0
tag_release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [simple_deployment_pipeline]
steps:
- name: Bump version and push tag
if: ${{ ! contains(join(toJson(github.event.commits.*.message), ' '), '#skip') }}
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

discord_notification:
runs-on: ubuntu-latest
needs: [simple_deployment_pipeline]
steps:

- name: Test Success
uses: rjstone/discord-webhook-notify@v1
if: success()
with:
severity: info
details: Build Succeeded and a new version is deployed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
- name: Test Failure
uses: rjstone/discord-webhook-notify@v1
if: failure()
with:
severity: error
details: build Failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

9 changes: 9 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
9 changes: 9 additions & 0 deletions cypress/e2e/Pokemon.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe("Pokedex", function () {
it("front page can be opened", function () {
cy.visit("http://localhost:3000");
cy.contains("ivysaur");
cy.contains(
"Pokémon and Pokémon character names are trademarks of Nintendo."
);
});
});
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading