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

Test #209

Open
wants to merge 100 commits into
base: main
Choose a base branch
from
Open

Test #209

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
eddd44f
test
Stbs0 Aug 27, 2024
1c39d16
test two long from
Stbs0 Aug 27, 2024
c220c1c
exercise 11.5
Stbs0 Aug 27, 2024
d5c00c0
s
Stbs0 Aug 27, 2024
1f43a62
j
Stbs0 Aug 27, 2024
0a1b7a6
lint
Stbs0 Aug 27, 2024
622ec47
fix fix lint
Stbs0 Aug 27, 2024
3d45cef
test
Stbs0 Aug 27, 2024
e5c2b34
fixed test
Stbs0 Aug 27, 2024
12590ff
add playwrite test
Stbs0 Aug 27, 2024
f82479b
fix amd add playwrite
Stbs0 Aug 27, 2024
9451881
ultimate fix playwrite
Stbs0 Aug 27, 2024
385e589
aa
Stbs0 Aug 27, 2024
3d80cf5
q
Stbs0 Aug 27, 2024
0086eaa
finish exercies 11.9
Stbs0 Aug 27, 2024
e663f24
finish with ren der
Stbs0 Aug 27, 2024
1f03126
chech health
Stbs0 Aug 27, 2024
4d16e26
b
Stbs0 Aug 27, 2024
aad50b6
error
Stbs0 Aug 27, 2024
fbba132
finished
Stbs0 Aug 27, 2024
b6a97b7
j
Stbs0 Aug 29, 2024
54dfba1
Merge pull request #5 from Stbs0/test
Stbs0 Aug 29, 2024
d3709ae
ja
Stbs0 Aug 29, 2024
4e84d59
Merge pull request #6 from Stbs0/test
Stbs0 Aug 29, 2024
b3c5b75
a
Stbs0 Aug 29, 2024
53c2c14
Merge pull request #7 from Stbs0/test
Stbs0 Aug 29, 2024
b44b6fc
b
Stbs0 Aug 29, 2024
78e55c5
Merge pull request #8 from Stbs0/test
Stbs0 Aug 29, 2024
31207f2
c
Stbs0 Aug 29, 2024
21bf695
Merge pull request #9 from Stbs0/test
Stbs0 Aug 29, 2024
957bbf6
d
Stbs0 Aug 29, 2024
f379504
Merge pull request #10 from Stbs0/test
Stbs0 Aug 29, 2024
6b38a1c
e
Stbs0 Aug 29, 2024
8d5ce92
Merge pull request #11 from Stbs0/test
Stbs0 Aug 29, 2024
f3e8e3a
stuff
Stbs0 Aug 29, 2024
69ba984
Merge pull request #12 from Stbs0/test
Stbs0 Aug 29, 2024
2c55c5c
test
Stbs0 Aug 30, 2024
9210094
#skip oijefoijef
Stbs0 Aug 30, 2024
3df30e0
#skip oijefoijef
Stbs0 Aug 30, 2024
17d12a3
Merge pull request #13 from Stbs0/test
Stbs0 Aug 30, 2024
f0bf174
test
Stbs0 Aug 30, 2024
0760948
Merge branch 'main' into test
Stbs0 Aug 30, 2024
eb34954
build
Stbs0 Aug 30, 2024
5a7bced
Merge pull request #14 from Stbs0/test
Stbs0 Aug 30, 2024
485d7d0
build
Stbs0 Aug 30, 2024
ad003dd
Merge pull request #15 from Stbs0/test
Stbs0 Aug 30, 2024
9456bd4
build
Stbs0 Aug 30, 2024
7038f8e
build
Stbs0 Aug 30, 2024
5722a5d
Merge pull request #16 from Stbs0/test
Stbs0 Aug 30, 2024
10bb960
test
Stbs0 Aug 30, 2024
509a124
Merge branches 'test' and 'main' of github.com:Stbs0/full-stack-open-…
Stbs0 Aug 30, 2024
fb0884f
test2
Stbs0 Aug 30, 2024
9368986
Merge pull request #17 from Stbs0/test
Stbs0 Aug 30, 2024
ebaa518
test3
Stbs0 Aug 30, 2024
8efeab2
Merge pull request #18 from Stbs0/test
Stbs0 Aug 30, 2024
3029499
test4
Stbs0 Aug 30, 2024
13fc667
Merge pull request #19 from Stbs0/test
Stbs0 Aug 30, 2024
6d977f8
test4
Stbs0 Aug 30, 2024
ead0231
Merge pull request #20 from Stbs0/test
Stbs0 Aug 30, 2024
09309a1
test5
Stbs0 Aug 30, 2024
5e9f23e
Merge pull request #21 from Stbs0/test
Stbs0 Aug 30, 2024
6d9ca4e
test6
Stbs0 Aug 30, 2024
5e2383b
Merge pull request #22 from Stbs0/test
Stbs0 Aug 30, 2024
0b3120e
test7
Stbs0 Aug 30, 2024
d88280d
Merge pull request #23 from Stbs0/test
Stbs0 Aug 30, 2024
6ff8824
test8
Stbs0 Aug 30, 2024
e9eda0f
Merge pull request #24 from Stbs0/test
Stbs0 Aug 30, 2024
743005a
test9
Stbs0 Aug 30, 2024
f2a588c
Merge pull request #25 from Stbs0/test
Stbs0 Aug 30, 2024
ad1ee9f
test10
Stbs0 Aug 30, 2024
4074aef
Merge pull request #26 from Stbs0/test
Stbs0 Aug 30, 2024
f528117
test10
Stbs0 Aug 30, 2024
c32da6e
Merge pull request #27 from Stbs0/test
Stbs0 Aug 30, 2024
44d120d
test10
Stbs0 Aug 30, 2024
c2350bd
Merge pull request #28 from Stbs0/test
Stbs0 Aug 30, 2024
0547577
test10
Stbs0 Aug 30, 2024
96a2d25
Merge pull request #29 from Stbs0/test
Stbs0 Aug 30, 2024
e72376a
test10
Stbs0 Aug 30, 2024
6e50979
Merge pull request #30 from Stbs0/test
Stbs0 Aug 30, 2024
0c6389a
test10
Stbs0 Aug 30, 2024
d8419a0
Merge pull request #31 from Stbs0/test
Stbs0 Aug 30, 2024
82cfb0c
test10
Stbs0 Aug 30, 2024
f8bea8a
test10
Stbs0 Aug 30, 2024
4b4fd59
test10
Stbs0 Aug 30, 2024
9c9da6e
Merge pull request #32 from Stbs0/test
Stbs0 Aug 30, 2024
77a1d38
test10
Stbs0 Aug 30, 2024
72dd704
Merge pull request #33 from Stbs0/test
Stbs0 Aug 30, 2024
3d06f39
test10
Stbs0 Aug 30, 2024
3d28448
test10
Stbs0 Aug 30, 2024
b14cb0d
test10
Stbs0 Aug 30, 2024
985a937
test10
Stbs0 Aug 30, 2024
a628a11
Merge pull request #34 from Stbs0/test
Stbs0 Aug 30, 2024
7a51ad3
test10
Stbs0 Aug 30, 2024
75c7373
Merge pull request #35 from Stbs0/test
Stbs0 Aug 30, 2024
0886081
test10
Stbs0 Aug 30, 2024
08c6d72
Merge pull request #36 from Stbs0/test
Stbs0 Aug 30, 2024
2943381
test10
Stbs0 Aug 30, 2024
5ff902f
Merge branch 'main' into test
Stbs0 Sep 25, 2024
3463a20
final commit
Stbs0 Sep 25, 2024
a2095cc
final commit
Stbs0 Sep 25, 2024
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
webpack.config.js
node_modules/
dist/
tests/
playwright-report/

67 changes: 23 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,28 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"jest/globals": true
env: {
browser: true,
es6: true,
"jest/globals": true,
node: 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],

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
}
}
"object-curly-spacing": ["error", "always"],
"arrow-spacing": ["error", { before: true, after: true }],
"no-console": "off",
"react/prop-types": 0,
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
};
17 changes: 17 additions & 0 deletions .github/workflows/health_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: health_check

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

jobs:
health_check:
runs-on: ubuntu-latest
steps:
- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v4
with:
url: https://full-stack-open-pokedex-gsxl.onrender.com/
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
env:
COMMIT_MESSAGES: ${{ toJson(github.event.commits.*.message) }}
SKIP_CONDITION: ${{ !contains(join(github.event.commits.*.message, ' '), '#skip') }}
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Debug SKIP_CONDITION
run: echo "SKIP_CONDITION ${{ env.SKIP_CONDITION }}"

test:
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Debug SKIP_CONDITION
run: echo "SKIP_CONDITION ${{ env.SKIP_CONDITION }}"
tag_release:
needs: [build]
if: ${{ github.event_name == 'push'}}

runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Bump version and push tag
if: ${{env.SKIP_CONDITION == 'true'}}
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
- name: Test Success
uses: sarisia/actions-status-discord@v1
if: success()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}

deploy:
needs: [build]
if: ${{ github.event_name == 'push'}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trigger deployment
if: ${{env.SKIP_CONDITION == 'true'}}
run: curl ${{ secrets.RENDER_DEPLOY_URL }}
- name: Test Success
uses: sarisia/actions-status-discord@v1
if: success()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
- name: Test Failure

uses: sarisia/actions-status-discord@v1
if: failure()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
31 changes: 31 additions & 0 deletions .github/workflows/test_stuff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Testing stuff
env:
SKIP_CONDITION: ${{ contains(join(github.env.COMMIT_MESSAGES, ' '), '#skip') }}
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
a_test_job:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: commits
env:
COMMITS: ${{ toJson(github.event.commits) }}
run: echo "$COMMITS"
- name: commit messages
env:
COMMIT_MESSAGES: ${{ toJson(github.event.commits.*.message) }}
#gg
run: echo "$COMMIT_MESSAGES"

- name: skipped
run: echo ${{ env.SKIP_CONDITION }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
dist/
node_modules/
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ const app = express();
const PORT = process.env.PORT || 5000;

app.use(express.static("dist"));
app.get("/version", (_req, res) => {
res.send("1");
});
app.get("/health", (req, res) => {
res.send("ok");
});

app.listen(PORT, () => {
console.log(`server started on port ${PORT}`);
});
//
5 changes: 5 additions & 0 deletions build_step.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo "Build script"

# add the commands here
84 changes: 80 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start-prod": "node app.js",
"test": "jest",
"eslint": "eslint './**/*.{js,jsx}'",
"build": "webpack --mode production"
"build": "webpack --mode production",
"test:e2e": "playwright test"
},
"repository": {
"type": "git",
Expand All @@ -28,8 +29,10 @@
"@babel/plugin-transform-runtime": "^7.23.7",
"@babel/preset-env": "^7.23.7",
"@babel/preset-react": "^7.23.3",
"@playwright/test": "^1.44.1",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@types/node": "^22.5.0",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.3",
"css-loader": "^6.8.1",
Expand All @@ -54,6 +57,9 @@
"react-router-dom": "^6.21.1"
},
"jest": {
"testEnvironment": "jsdom"
"testEnvironment": "jsdom",
"testPathIgnorePatterns": [
"tests"
]
}
}
Loading