* Fix GitHub commit passing, UI build and cache for different purposes
* a logging for transparency and easy debug
* Fix var expanding with quotes and add intermediate verification commands
* split verification commands
* fix joining commands
* Ecplicitly pull latest deps image
* properly set arg default values and try to fix preparation step
* another try to build the image with the correct deps tag
* Revert the dynamic deps tag discovery, as it doesn't work and the actual `latest` image is pulled implicitly anyway
* Final optimizations
* "NoCommit" placeholder, indent fix, var rename
---------
Co-authored-by: Konstantin Koval
* Fix the local build of the dependencies image, including the debug image instructions
* Make the deps image easily runnable
* improve readme
* Better caching strategy
* make dependency from IM to libs build stages
* fix missing folder error
* Hopefully, final solution
---------
Co-authored-by: Konstantin Koval
* Initial implementation
* Multiple fixes and improvemens
* Better `curl` retries timing
* Remove unused `TARGETOS` and `TARGETVARIANT` vars; add the version fetch fallback code to the build scripts
* Move the fallback code before the var usage
* Use double braces to make the code compatible with the `set -u`
---------
Co-authored-by: Konstantin Koval
* Define sub-projects and set coverage threshold for failure in the `codecov.yml`; make both test execution engines to generate also JUnit reports; upload these JUnit reports to Codecov for analysis
* Fix UI Vite config and add more details to the API is-generated-code script
* Add API JUnit report file to `.gitignore`
* Fix the copy issue by mounting the volume
* put the exact report name to the `docker cp` command
* Added `set -euxo pipeline` to the `test_api_coverage.sh` script; try to fix the missing report issue by setting immutable flag and report directoty
* Revert `chattr` and `set` commands, as they cause errors
* debug
* put the filename of the JUnit report to upload
* `set -euxo pipefail` in `scripts/test_api_coverage.sh`
---------
Co-authored-by: Konstantin Koval
* Run ESLint inside the testing container
* Switch to `docker exec` as the container is still alive after the testing
* Get back to `docker run`, as `exec` doesn't work for stopped containers
* Add missing ESLint plugin for React
* And 1 more missing plugin
* Add missing command to copy the report
* Set `$PHOTOVIEW_LISTEN_IP` to "0.0.0.0" as it has to accept connections from outside and from the healthcheck in localhost
---------
Co-authored-by: Konstantin Koval <kkb@ukr.net>
* Set $NODE_ENV according to the image purpose during Docker build
* Move `husky` from dev-deps to prod-deps, as it is used during prod `npm ci`
---------
Co-authored-by: Konstantin Koval <kkb@ukr.net>
* Add missing script line back to the `package.json`
* Set CodeCov token for coverage upload steps
---------
Co-authored-by: Konstantin Koval <kkb@ukr.net>
Updated DB images in tests to align with the PROD setup
Try to upload coverage only if tests were executed (passed or failed) - not skipped or canceled
Added ESLint execution after UI tests with results exported to artifact
Shifted scheduled run time from 00 minutes according to GitHub recommendations, as the 00 minutes of each hour is the busiest time
Dynamically extract a list of langs from the repo to use them for CodeQL analysis instead of hardcoded ones
Updated versions of several outdated actions
Added the Autobuild step before CodeQL analysis for GO
Added the Anchore dependency scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Added the Hadolint Dockerfile scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Implemented weekly rebuild of images for the latest commit in the master branch and the latest released tag. It will recreate images with the recent base image and 3rd-party dependencies even if there were no new pushes for a long time
Added the Dockle container analysis job to be run on master and tag and validate just pushed images, reporting to the Security tab
Added golangci-lint config to the /api folder, as a starting point and for local usage
Added 2 weekly jobs for Dependabot:
-- Maintain dependencies for GitHub Actions
-- Maintain dependencies for Dockerfile
---------
Co-authored-by: Konstantin Koval
* Validate incoming GPS data and throw an error if it is incorrect, storing Null values
* Extracted GPS data processing to function in external parser; optimized IF in internal parser; removed unnecessary comments; set exact values for positive test
* Add the migration for removing existing invalid GPS data and its test; added better errors to asserts in the GPS validation test
* Install FFmpeg and ExifTool on the API unit-test environment
* Fix 'stripped.jpg', 'IncorrectGPS.jpg', and 'CorrectGPS.jpg' tests for the external parser
* Optimized data validation in the external parser, returned error by the internal parser for invalid data, updated test to expect errors and handle them
* Switched from error to log entry in case of incorrect GPS data, as error handling is not so transparent in the internal parser
---------
Co-authored-by: Konstantin Koval
* Bump go version to 1.22. Bump all go module to the newest version, except pinning libheif@v1.15.1 to match the c lib version in Debian bookworm.
* Update go_wrapper.sh to fit golang image.
* Update the way to set go envs.
* Test against go 1.22
* Set default shell for all building stage in Dockerfile.