Skip to content

Commit

Permalink
Version 3.0: added tests, tooling and github actions (#14)
Browse files Browse the repository at this point in the history
* Chore: add tooling and configuration (#5)

* Chore: added github actions (#7)

* chore: add css github action

* chore: add css github action for editor config

* chore: add css github action for html validation

* chore: fixed action files

* chore: added markdown linting with action

* Chore: optimised configs (#8)

* Chore: added screenshot tests (#9)

* test: added screenshot taking script

* test: added screenshot comparing test

* test: refactored for reuse

* test: added github action for tests

* test: added artifacts action for tests

* test: refactored tests styling

* test: added more timeout to test running

* test: tuned up tests and pipeline

* test: wrote down correct pixel diff

* refactor: fixed css according stylelint

* refactor: alphabetised css

* Feat: added versioning to assets to prevent undesired caching (#15)

* chore: exclude materials from editor checker

* feat: added versioning to assets to prevent cahing

* fix: added asset file types to properly handled by git

* docs: updated readme

* Test: updated reference screenshots from ubuntu (#16)

* Feat: updated materials and assets (#17)

* Сhore: added gulp automation (#18)

* chore: added frozen-lockfile flag for yarn install in actions

* chore: added yarn cache for css action

* chore: added yarn cache for css action

* chore: added yarn cache for editorconfig action

* chore: updated yarn cache for editorconfig action

* chore: fixed yarn cache for editorconfig action

* chore: added yarn cache for markdown action

* chore: added yarn cache for test and html action

* chore: added gulp build pipeline

* fix: unsupportable symbols in html

* test: updated tests to work form build directory

* test: updated polyserve config

* Feat: added black theme and icon generator (#19)

* chore: added ico and jpeg binary attributes

* chore: added gulp real favicon task

* chore: added icons to html, split gulp tasks

* Feat: added dark theme (#20)

* feat: added dark theme

* fix: h3 left margin

* chore: add .ecrc config file with excluded entities

Co-authored-by: DmitryMarkov <dmitry.markov@allthings.me>

Co-authored-by: DmitryMarkov <dmitry.markov@allthings.me>
  • Loading branch information
DmitryMarkov and DmitryMarkov committed Nov 8, 2020
1 parent 978b806 commit e94a640
Show file tree
Hide file tree
Showing 46 changed files with 12,123 additions and 118 deletions.
3 changes: 3 additions & 0 deletions .ecrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"exclude": ["materials", "faviconData.json"]
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json, yml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* text eol=lf

*.docx binary
*.ico binary
*.jpg binary
*.jpeg binary
*.pdf binary
*.png binary
*.psd binary
29 changes: 29 additions & 0 deletions .github/workflows/css.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CSS
on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- run: yarn css
29 changes: 29 additions & 0 deletions .github/workflows/editorconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: EditorConfig
on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn editorconfig
34 changes: 34 additions & 0 deletions .github/workflows/html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: HTML
on: [pull_request]

jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
java: [8.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: x64

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn html
29 changes: 29 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Markdown
on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn markdown
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests
on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn test
- uses: actions/upload-artifact@v1
if: failure()
with:
name: diff
path: test/screenshots
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,24 @@ coverage
# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Compiled binary
build

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Other
/*/.DS_Store
/.DS_Store
lib
winscp.md
.idea

# Tests
test/screenshots
28 changes: 23 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
# v2.3.0 [2019-12-07]
# Changelog

## v3.0.0 [2020-11-08]

- Added husky, lint-staged, commitlint, editorconfigchecker, markdown lint, prettier, stylelint and renovate-bot
- Added gulp build pipeline
- Added GitHub Actions
- Added screenshot tests with Puppeteer
- Added versioning tag to assets to prevent undesired cashing
- Added icon generator and manifest
- Added dark theme
- Updated CV verbiage and assets

## v2.3.0 [2019-12-07]

- Improved Lighthouse analytics score (100/4)

# v2.2.0 [2019-12-02]
## v2.2.0 [2019-12-02]

- Updated title, experience and assets
- Replaced Behance link with LinkedIn
- Updated icons format from woff to woff2

# v2.1.0 [2019-07-20]
## v2.1.0 [2019-07-20]

- Added new experience (Allthings)
- Updated introduction

# v2.0.0 [2018-10-28]
## v2.0.0 [2018-10-28]

- Removed russian version
- Updated last position experience
- Updated assets and verbiage
- Fixed list presentation on small viewports

# v1.0.0 [2018-07-22]
## v1.0.0 [2018-07-22]

- Initial release
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
![][actions-tests] ![][actions-html] ![][actions-css] ![][actions-markdown] ![][actions-editor-config]
# Dmitry Markov's CV

Available on https://dmitrymarkov.pro

[actions-css]: https://github.com/DmitryMarkov/cv-markov/workflows/CSS/badge.svg
[actions-html]: https://github.com/DmitryMarkov/cv-markov/workflows/HTML/badge.svg
[actions-markdown]: https://github.com/DmitryMarkov/cv-markov/workflows/Markdown/badge.svg
[actions-tests]: https://github.com/DmitryMarkov/cv-markov/workflows/Tests/badge.svg
[actions-editor-config]: https://github.com/DmitryMarkov/cv-markov/workflows/EditorConfig/badge.svg
Binary file removed _materials/og-image-1200.psd
Binary file not shown.
Binary file modified assets/documents/Dmitry-Markov-2019.docx
Binary file not shown.
Binary file modified assets/documents/Dmitry-Markov-2019.pdf
Binary file not shown.
Binary file removed assets/images/apple-icon.png
Binary file not shown.
Binary file modified assets/images/og-image-1200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions faviconData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/README.md","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/browserconfig.xml","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/favicon.ico","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/html_code.html","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/package_files/site.webmanifest"],"html_code":"<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png?v=3.0.0\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png?v=3.0.0\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png?v=3.0.0\">\n<link rel=\"manifest\" href=\"/site.webmanifest?v=3.0.0\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg?v=3.0.0\" color=\"#5bbad5\">\n<link rel=\"shortcut icon\" href=\"/favicon.ico?v=3.0.0\">\n<meta name=\"apple-mobile-web-app-title\" content=\"Dmitry Markov\">\n<meta name=\"application-name\" content=\"Dmitry Markov\">\n<meta name=\"msapplication-TileColor\" content=\"#2b5797\">\n<meta name=\"msapplication-TileImage\" content=\"/mstile-144x144.png?v=3.0.0\">\n<meta name=\"theme-color\" content=\"#ffffff\">","compression":"true","overlapping_markups":["link[rel=\"apple-touch-icon\"]","meta[name=\"apple-mobile-web-app-title\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-TileImage\"]","meta[name=\"application-name\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/2dd723d730894d90fb4e0cda8a3337554241acce/favicon_preview.png","version":"0.16"}
5 changes: 5 additions & 0 deletions gulp/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = () => {
$.gulp.task('clean', cb => {
return $.del($.config.dest, cb)
})
}
7 changes: 7 additions & 0 deletions gulp/copy.assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = () => {
$.gulp.task('copy:assets', () => {
return $.gulp
.src('./assets/**/*.*', { since: $.gulp.lastRun('copy:assets') })
.pipe($.gulp.dest($.config.dest + '/assets'))
})
}
24 changes: 24 additions & 0 deletions gulp/do.css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = () => {
$.gulp.task('do:css', () => {
return $.gulp
.src('./src/*.css')
.pipe($.plugins.sourcemaps.init())
.pipe(
$.plugins.postcss([
$.autoprefixer(),
$.cssnano({
preset: [
'default',
{
discardComments: {
removeAll: true,
},
},
],
}),
])
)
.pipe($.plugins.sourcemaps.write('.'))
.pipe($.gulp.dest($.config.dest))
})
}
9 changes: 9 additions & 0 deletions gulp/do.html.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = () => {
$.gulp.task('do:html', () => {
return $.gulp
.src($.config.src + '/index.html')
.pipe($.plugins.replace('$version', $.package.version))
.pipe($.plugins.htmlmin({ collapseWhitespace: true }))
.pipe($.gulp.dest($.config.dest))
})
}
17 changes: 17 additions & 0 deletions gulp/favicon.check-for-update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Check for updates on RealFaviconGenerator (think: Apple has just
// released a new Touch icon along with the latest version of iOS).
// Run this task from time to time. Ideally, make it part of your
// continuous integration system.
module.exports = () => {
$.gulp.task('favicon:check-for-update', done => {
const currentVersion = JSON.parse(
$.fs.readFileSync($.config.faviconFile)
).version
$.plugins.realFavicon.checkForUpdates(currentVersion, err => {
if (err) {
throw err
}
done()
})
})
}
Loading

0 comments on commit e94a640

Please sign in to comment.