Skip to content

Commit b44acaf

Browse files
author
Greg Bowler
authored
SLC 6 - The Need for Speed (#163)
* feature: cached earnings * feature: merge product caching into main database migrations * wip: slc6 functionality * wip: super hyper slc6 upgrades * qa refactor * test: improve tests for refactor * build: update dependencies * feature: product-summary box query improvement * feature: generic modal implementation * test: update test layout * style: funky drop shadow * style: retro neo brutalism * style: retro neo brutalism * fix: split-editor OK button improvement closes #162 * fix: modal understands context shift between window.top and window closes #161
1 parent e9baeec commit b44acaf

File tree

195 files changed

+2052
-2625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+2052
-2625
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -33,59 +33,6 @@ jobs:
3333
name: build-artifact
3434
path: /tmp/github-actions
3535

36-
phpunit:
37-
runs-on: ubuntu-latest
38-
needs: [ composer ]
39-
strategy:
40-
matrix:
41-
php: [ 8.2, 8.3 ]
42-
43-
outputs:
44-
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
45-
46-
steps:
47-
- uses: actions/download-artifact@v3
48-
with:
49-
name: build-artifact
50-
path: /tmp/github-actions
51-
52-
- name: Extract build archive
53-
run: tar -xvf /tmp/github-actions/build.tar ./
54-
55-
- name: PHP Unit tests
56-
uses: php-actions/phpunit@v3
57-
env:
58-
XDEBUG_MODE: cover
59-
with:
60-
php_version: ${{ matrix.php }}
61-
php_extensions: xdebug zip
62-
coverage_text: _coverage/coverage.txt
63-
coverage_clover: _coverage/clover.xml
64-
65-
- name: Store coverage data
66-
uses: actions/upload-artifact@v3
67-
with:
68-
name: code-coverage
69-
path: _coverage
70-
71-
coverage:
72-
runs-on: ubuntu-latest
73-
needs: [ phpunit ]
74-
75-
steps:
76-
- uses: actions/checkout@v3
77-
78-
- uses: actions/download-artifact@v3
79-
with:
80-
name: code-coverage
81-
path: _coverage
82-
83-
- name: Output coverage
84-
run: cat "_coverage/coverage.txt"
85-
86-
- name: Upload to Codecov
87-
uses: codecov/codecov-action@v3
88-
8936
phpstan:
9037
runs-on: ubuntu-latest
9138
needs: [ composer ]
@@ -156,49 +103,49 @@ jobs:
156103
path: class/
157104
standard: phpcs.xml
158105

159-
# behat:
160-
# runs-on: ubuntu-latest
161-
# needs: [ composer ]
162-
# strategy:
163-
# matrix:
164-
# php: [ 8.2 ]
165-
#
166-
# steps:
167-
# - uses: actions/download-artifact@v3
168-
# with:
169-
# name: build-artifact
170-
# path: /tmp/github-actions
171-
#
172-
# - name: Extract build archive
173-
# run: tar -xvf /tmp/github-actions/build.tar ./
174-
#
175-
# - name: Behat
176-
# uses: php-actions/behat@v1
177-
# with:
178-
# php_version: ${{ matrix.php }}
106+
# behat:
107+
# runs-on: ubuntu-latest
108+
# needs: [ composer ]
109+
# strategy:
110+
# matrix:
111+
# php: [ 8.2 ]
112+
#
113+
# steps:
114+
# - uses: actions/download-artifact@v3
115+
# with:
116+
# name: build-artifact
117+
# path: /tmp/github-actions
118+
#
119+
# - name: Extract build archive
120+
# run: tar -xvf /tmp/github-actions/build.tar ./
121+
#
122+
# - name: Behat
123+
# uses: php-actions/behat@v1
124+
# with:
125+
# php_version: ${{ matrix.php }}
179126

180127

181128
# dev-deploy:
182-
# runs-on: ubuntu-latest
183-
# needs: [ composer, phpunit, phpstan, phpcs, phpmd ]
184-
#
185-
# steps:
186-
# - uses: actions/download-artifact@v3
187-
# with:
188-
# name: build-artifact
189-
# path: /tmp/github-actions
190-
#
191-
# - name: Extract build archive
192-
# run: tar -xvf /tmp/github-actions/build.tar ./
193-
#
194-
# - uses: php-actions/deploy-ssh@master
195-
# with:
196-
# hostname: deploy-endpoint.dev.trackshift.app
197-
# user: deploy
198-
# path: /var/www/trackshift
199-
# path_owner: www-data.
200-
# ssh_key: ${{ secrets.deploy_ssh_key }}
201-
# after_command: ./vendor/bin/gt build
129+
# runs-on: ubuntu-latest
130+
# needs: [ composer, phpunit, phpstan, phpcs, phpmd ]
131+
#
132+
# steps:
133+
# - uses: actions/download-artifact@v3
134+
# with:
135+
# name: build-artifact
136+
# path: /tmp/github-actions
137+
#
138+
# - name: Extract build archive
139+
# run: tar -xvf /tmp/github-actions/build.tar ./
140+
#
141+
# - uses: php-actions/deploy-ssh@master
142+
# with:
143+
# hostname: deploy-endpoint.dev.trackshift.app
144+
# user: deploy
145+
# path: /var/www/trackshift
146+
# path_owner: www-data.
147+
# ssh_key: ${{ secrets.deploy_ssh_key }}
148+
# after_command: ./vendor/bin/gt build
202149

203150
remove_old_artifacts:
204151
runs-on: ubuntu-latest

.gitignore

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
/.idea
21
/vendor/
3-
/data/
4-
/ts.db
5-
/config.*.ini
6-
/www/
7-
.DS_Store
2+
/.idea/
3+
/style/.sass-cache style/
4+
/www
5+
*.phar
6+
config.*.ini
87
access-token.dat
9-
asset/font/.DS_Store
10-
asset/.DS_Store
11-
/test/phpunit/_coverage/
12-
.phpunit*.cache
8+
/data/cache
9+
/data/upload

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,10 @@ Within the `class` directory are namespace-organised directories. Organised with
4646
- `ProductEarning`: Usages are converted into earnings which represent the different `Money` amounts associated to each usage of a Product: earning, cost, outgoing, profit.
4747
- `Cost`: Costs can be added to Products which will be subtracted from the earning.
4848
- `Split`: Splits can be added to Products to divide the remaining profit between different parties, according to their `SplitPercentage` value. A special type of percentage `RemainderSplitPercentage` is always added to a `Split`, with a value that is calculated as the remaining split from 100%.
49+
50+
Database
51+
--------
52+
53+
Since the first version, we've switched from SQLite to MySQL. (Insert quote about "how long until you realise MySQL is the solution?").
54+
55+
To achieve the features we need, MySQL imports directly from CSV. This is done by altering the

asset/.DS_Store

-8 KB
Binary file not shown.

asset/font/.DS_Store

-10 KB
Binary file not shown.

asset/font/geomanist/.DS_Store

-6 KB
Binary file not shown.

asset/img/.DS_Store

-6 KB
Binary file not shown.

asset/img/abstract/.DS_Store

-6 KB
Binary file not shown.

asset/img/product/.DS_Store

-6 KB
Binary file not shown.

behat.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ default:
1111
contexts:
1212
- \Behat\MinkExtension\Context\MinkContext:
1313
- \SHIFT\TrackShift\BehatContext\ServerContext:
14-
- \SHIFT\TrackShift\BehatContext\AuthContext:
1514
- \SHIFT\TrackShift\BehatContext\PageContext:
16-
- \SHIFT\TrackShift\BehatContext\UploadContext:
17-
- \SHIFT\TrackShift\BehatContext\ProductContext:
18-
- \SHIFT\TrackShift\BehatContext\SplitContext:
19-
- \SHIFT\TrackShift\BehatContext\NotificationContext:
20-
- \SHIFT\TrackShift\BehatContext\DebugContext:
15+
- \SHIFT\TrackShift\BehatContext\AuthSteps:
16+
- \SHIFT\TrackShift\BehatContext\UploadSteps:
17+
- \SHIFT\TrackShift\BehatContext\ProductSteps:
18+
- \SHIFT\TrackShift\BehatContext\SplitSteps:
19+
- \SHIFT\TrackShift\BehatContext\NotificationSteps:
20+
- \SHIFT\TrackShift\BehatContext\DebugSteps:
2121

2222
extensions:
2323
Behat\MinkExtension:

0 commit comments

Comments
 (0)