CI Pipeline - amplimindcc/frontend GitHub Wiki
The CI pipeline runs on pushing on main and opening, reopening and updating pull requests on main. It compiles SCSS, uses Prettier to format the code, lints the code and runs all tests on the feature branch from which the pull request was opened. This ensures consistent CSS files, code formatting and code quality.
- checks out the branch from which the pull request was opened with
${{ github.head_ref }}
- use the right node version for npm and npx commands
- install sass compiler for scss action
- install the packages dependencies
run the common-js script compile-scss.cjs
:
-
recursively traverse the whole frontend folder to find and compile any
.scss
files to.css
files in their own respective subdirectory - throw either info or error messages
- force add
.css
files - check if there are changes to commit and commit or print a message
- use username
github-actions[bot]
- use email address
github-actions[bot]@users.noreply.github.com
- autoformat code using
npx prettier . --write
(reformats all files in the /frontend directory and writes them)
- check if there are changes to commit and commit or print a message
- use username
github-actions[bot]
- use email address
github-actions[bot]@users.noreply.github.com
- executes
npm run lint
- executes
npm run test
- checks if there are commits to push and pushes them to the feature branch with
git push origin ${{ github.head_ref }}
or shows a message
Questions regarding CI Pipeline: @MysterionAutotronic, @cwsyth