Skip to content
Open

Test #49

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
eb31de4
updated to version 2.1
HennaAbbas Oct 12, 2020
b697894
this should fail
HennaAbbas Oct 12, 2020
bd391f5
this should fail
HennaAbbas Oct 12, 2020
79ab15e
fixed broken test
HennaAbbas Oct 12, 2020
73f1bd3
added slack orb
HennaAbbas Oct 12, 2020
71b92db
something
HennaAbbas Oct 12, 2020
0d111a7
this build will fail
HennaAbbas Oct 13, 2020
3a422ec
Update config.yml
HennaAbbas Nov 10, 2020
17c89f3
Update config.yml
HennaAbbas Nov 10, 2020
ed8d624
Update config.yml
HennaAbbas Nov 10, 2020
8fa5a3e
Update test_forms.py
HennaAbbas Nov 10, 2020
ba02b11
fixed test
HennaAbbas Nov 11, 2020
3774acf
fixed test
HennaAbbas Nov 11, 2020
9595d55
fixed
HennaAbbas Nov 11, 2020
5d752dd
restored old cnfig
HennaAbbas Nov 11, 2020
bfcdf5a
fixed
HennaAbbas Nov 11, 2020
87b0209
this test will fail
HennaAbbas Nov 11, 2020
10c8c78
this is a commit
HennaAbbas Dec 9, 2020
10992ed
this will have a failed test
HennaAbbas Dec 9, 2020
fda1374
Update config.yml
HennaAbbas Dec 11, 2020
cdbb3c8
fix
HennaAbbas Dec 11, 2020
f20a77d
Merge branch 'master' of https://github.com/HennaAbbas/circleci-demo-…
HennaAbbas Dec 11, 2020
2b582f9
Update config.yml
HennaAbbas Dec 11, 2020
41664f9
Update config.yml
HennaAbbas Dec 11, 2020
b283c67
Update config.yml
HennaAbbas Dec 11, 2020
ef23172
Update config.yml
HennaAbbas Dec 11, 2020
393e6e3
Update config.yml
HennaAbbas Dec 11, 2020
b713ad8
Update config.yml
HennaAbbas Dec 11, 2020
1b63277
Update config.yml
HennaAbbas Dec 11, 2020
29a640c
Updated config.yml
HennaAbbas Dec 11, 2020
6b3a8bb
env var
HennaAbbas Dec 11, 2020
334fc55
env var
HennaAbbas Dec 11, 2020
b64b343
Updated config.yml
HennaAbbas Dec 11, 2020
9d91027
echo env var into bash env
HennaAbbas Dec 11, 2020
4702954
fixed echo env var into bash env
HennaAbbas Dec 11, 2020
efd3d4e
Update config.yml
HennaAbbas Dec 23, 2020
dfae955
Update config.yml
HennaAbbas Dec 23, 2020
1f4d00d
Update config.yml
HennaAbbas Jan 4, 2021
d654167
Update config.yml
HennaAbbas Jan 4, 2021
8ffe492
Update config.yml
HennaAbbas Jan 6, 2021
98888f5
Update config.yml
HennaAbbas Jan 8, 2021
cbfe03a
Update config.yml
HennaAbbas Jan 8, 2021
7edd99c
commit
HennaAbbas Jan 25, 2021
af7ba50
commit
HennaAbbas Jan 25, 2021
a8c62a4
fixed config
HennaAbbas Jan 25, 2021
1647c9b
fixed config
HennaAbbas Jan 25, 2021
d548301
added tag filters
HennaAbbas Jan 25, 2021
c0405b9
fixed typo in tag filter
HennaAbbas Jan 25, 2021
e01e2a6
builds for all tags
HennaAbbas Jan 25, 2021
62783a0
added mongo container
HennaAbbas Jan 27, 2021
ed73918
commit
HennaAbbas Jan 27, 2021
fe85ac1
Update config.yml
HennaAbbas Feb 6, 2021
6ee6119
Update config.yml
HennaAbbas Feb 6, 2021
f47f774
Update config.yml
HennaAbbas Feb 6, 2021
10d867f
Update config.yml
HennaAbbas Feb 9, 2021
af3411a
Update config.yml
HennaAbbas Feb 9, 2021
ec39e76
commit
HennaAbbas Feb 10, 2021
6db00e7
commit
HennaAbbas Feb 10, 2021
229a37d
this test should fail
HennaAbbas Feb 10, 2021
91ca4db
fixed failing code
HennaAbbas Feb 10, 2021
88b0f3c
testing
HennaAbbas Feb 17, 2021
7079c83
workspaces
HennaAbbas Feb 17, 2021
a8352c8
our first build
HennaAbbas Feb 17, 2021
83db540
our test will break
HennaAbbas Feb 17, 2021
7ff34c0
workspaces
HennaAbbas Feb 17, 2021
76e2c71
called jobs
HennaAbbas Feb 17, 2021
954c9a7
running jobs sequentially
HennaAbbas Feb 17, 2021
11dba2c
test
HennaAbbas Feb 22, 2021
99c0d84
test
HennaAbbas Feb 22, 2021
43c7dbd
test branch
HennaAbbas Feb 22, 2021
0fca8d7
checking
HennaAbbas Feb 22, 2021
647d62a
fixed typo
HennaAbbas Feb 22, 2021
85b3feb
checking SHA
HennaAbbas Feb 22, 2021
0c6c533
fixed env var syntax
HennaAbbas Feb 22, 2021
57ea2f4
added a step to check git diff
HennaAbbas Feb 23, 2021
b7a1b09
Update config.yml
HennaAbbas Nov 16, 2021
38ec206
Update config.yml
HennaAbbas Nov 16, 2021
61812f9
Update config.yml
HennaAbbas Nov 16, 2021
8bf56f4
Update config.yml
HennaAbbas Nov 16, 2021
c4cf630
Update config.yml
HennaAbbas Nov 17, 2021
d1be7b6
Update config.yml
HennaAbbas Nov 17, 2021
67c0fb0
Update config.yml
HennaAbbas Nov 17, 2021
e752d6c
Update config.yml
HennaAbbas Nov 17, 2021
88af251
Update config.yml
HennaAbbas Dec 9, 2021
d15ddb0
Update config.yml
HennaAbbas Dec 9, 2021
e592a8e
Update config.yml
HennaAbbas Dec 9, 2021
f4196e8
Update config.yml
HennaAbbas Dec 9, 2021
804be9a
Update config.yml
HennaAbbas Dec 10, 2021
2859bf1
Update config.yml
HennaAbbas Jan 19, 2022
f79163c
Update config.yml
HennaAbbas Jan 19, 2022
1480fd5
Update config.yml
HennaAbbas Jan 19, 2022
1cbb395
Update config.yml
HennaAbbas Jan 19, 2022
b572427
Update config.yml
HennaAbbas Jan 19, 2022
8fc3c7b
Update config.yml
HennaAbbas Jan 19, 2022
db2ecf7
Update config.yml
HennaAbbas Jan 24, 2022
cba5021
Update config.yml
HennaAbbas Jan 24, 2022
3999977
Update config.yml
HennaAbbas Jan 24, 2022
c9a5f8b
Update config.yml
HennaAbbas Jan 26, 2022
d7e39b2
Update config.yml
HennaAbbas Jan 26, 2022
6ec4bf6
Update config.yml
HennaAbbas Mar 17, 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
143 changes: 112 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,118 @@
version: 2
version: 2.1

test-names: &test-names
- mocha:unit:ci
- mocha:unit:rateplan
- test:billing-service-integration

orbs:
slack: circleci/slack@4.12

parameters:
service_name:
default: "my-awesome-service"
type: string

dev_channels:
default: "slack-notify-test"
type: string

staging_channels:
default: "slack-notify-test"
type: string

prodcopy_channels:
default: "slack-notify-test"
type: string

prod_channels:
default: "slack-notify-test"
type: string

environment:
default: "prod"
type: string

jobs:
build:
working_directory: ~/circleci-demo-python-django
deploy:
docker:
- image: circleci/python:3.6.4
environment:
PIPENV_VENV_IN_PROJECT: true
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
- image: circleci/postgres:9.6.2
environment:
POSTGRES_USER: root
POSTGRES_DB: circle_test
- image: 'cimg/base:stable'
resource_class: hippo/k8s-small
parameters:
test-name:
type: string
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
- restore_cache:
key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
name: "Simple echo"
command: |
sudo pip install pipenv
pipenv install
- save_cache:
key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
- '.venv'
- '/usr/local/bin'
- '/usr/local/lib/python3.6/site-packages'
- run:
pwd
echo "Testing Slack notification."
echo "Test name: << parameters.test-name >>"
- slack/notify:
step_name: "Send Slack - Failure"
channel: "slack-notify-test, "
event: fail
template: basic_fail_1
- slack/notify:
step_name: "Send Slack - Success"
channel: "slack-notify-test, "
custom: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":white_check_mark: Success to deploy << parameters.test-name >> to << pipeline.parameters.environment >>",
"emoji": true
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"text": "View Deployment Job",
"type": "plain_text"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
event: pass
test:
docker:
- image: 'cimg/base:stable'
steps:
- run:
command: |
pipenv run python manage.py test
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
destination: tr1
echo "test my app"
echo "export ENV_NAME=staging" >> $BASH_ENV

workflows:
test-and-deploy:
jobs:
- test
- slack/on-hold:
channel: 'slack-notify-test'
context: slack-secrets
requires:
- test
- pause_workflow:
requires:
- test
- slack/on-hold
type: approval
- deploy:
matrix:
alias: "Test name"
parameters:
test-name: *test-names
context: slack-secrets
requires:
- pause_workflow


3 changes: 2 additions & 1 deletion catalog/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_renew_form_date_today(self):
Test form is valid if renewal_date is today
"""
date = datetime.date.today()
# date = "hello"
form_data = {'renewal_date': date}
form = RenewBookForm(data=form_data)
self.assertTrue(form.is_valid())
Expand Down Expand Up @@ -58,4 +59,4 @@ def test_renew_form_date_field_help_text(self):
Test renewal_date help_text is as expected.
"""
form = RenewBookForm()
self.assertEqual(form.fields['renewal_date'].help_text,'Enter a date between now and 4 weeks (default 3).')
self.assertEqual(form.fields['renewal_date'].help_text,'Enter a date between now and 4 weeks (default 3).')
15 changes: 15 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import requests

payload = {'term': 'honeydew'}

res = requests.get('https://itunes.apple.com/search',
params=payload)

melon_songs = res.json()

num_results = melon_songs['resultCount']

for i in range(num_results):
trackName = melon_songs['results'][i].get('trackName')
artistName = melon_songs['results'][i].get('artistName')
print({trackName})