issues
search
masterdock-io
/
masterdock
0
stars
0
forks
source link
Build pipeline for development / testing / production.
#2
Closed
casek
closed
8 months ago
casek
commented
9 months ago
create frontend app by quasar-cli
create backend app by Flask
build Docker container for PostgreSQL / mailhog / frontend app / backend app.
build test env.
frontend
install cypress AE
signup Cypress Cloud (
https://cloud.cypress.io/projects/bq461j
)
run e2e test
backend
install pytest
(change directory layout)
create dummy test
run unit test
casek
commented
9 months ago
github actions向けにself hosted runnerを用意
frontendのdocker containerを少々調整
Cypressのrecord keyを環境変数から取得するように変更(←最初はpackage.jsonにハードコードしていた...)
docker hubのnode imageを最新(21-bullseye)に変更したが…yarnがnode21は対応してない(新しすぎ)と言って怒るのでlts-bullseye(node 20)に戻す
casek
commented
9 months ago
create workflows for github actions.
write workflow for frontend and backend
set actions variable CYPRESS_KEY (cypress record key) on github repo.
using self-host by ec2 instance on wazzup aws account.
for Amazon Linux 2023... (not need this for ubuntu-latest)
make symbolic link... python3 -> python
yum install python(version)-pip
make symbolic link... pip(version) -> pip
must be the same version between python and pip. (Amazon Linux 2023 I use has python 3.9...)
the following is required for cypress
yum install -y Xvfb
yum install -y pango pango pango-devel libXrandr libXrandr-devel libXcursor libXcursor-devel cups-libs
yum install atk atk-devel
yum -y install at-spi2-atk.x86_64 for "atk-bridge"
yum install gtk3 gtk3-devel
yum install alsa-lib for "libasound"
ref.
https://medium.com/aubergine-solutions/install-cypress-io-front-end-testing-tool-dependencies-on-amazon-linux-ami-ec2-instance-f676da4abbdd
It may be better to build self-hosted runner with ubuntu...
create branch protection rule
to disallow force push to main branch...
on "Require a pull request before merging"
on "Dismiss stale pull request approvals when new commits are pushed"
on "Do not allow bypassing the above settings"
but... disable this rule for the time being.
casek
commented
8 months ago
change workflows
merge frontend workflow and backend workflow using tj-actions/changed-files@v42
available branch protection rule for "main"