Commit Graph

103 Commits

Author SHA1 Message Date
dependabot[bot]
bf05f24b56 Bump actions/checkout from 4 to 5 in /.github/workflows (#1277)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 17:09:52 +03:00
Kostiantyn
882c6abc84 Fix failed build for v2.4.0 version (#1244)
* Fix failed build for `v2.4.0` version

* fix the typo

---------

Co-authored-by: Konstantin Koval
2025-07-10 10:26:46 +03:00
Kostiantyn
3bc3e09467 Fix GitHub commit passing, UI build and cache for different purposes (#1239)
* 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
2025-07-08 17:13:20 +03:00
Kostiantyn
fafa3a3d64 Fix the local build of the dependencies image, including the debug image instructions (#1229)
* 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
2025-06-29 22:41:17 +03:00
Kostiantyn
a8edb30ae4 Refactor Docker build workflows (#1221)
* 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
2025-06-26 11:58:50 +03:00
Googol Lee
9d7cf8ad33 Drop linux/arm/v7 2025-05-17 09:45:39 +02:00
Kostiantyn
bab6ccb538 Bump the anchore/scan-action to the version 6 in the Code analysis workflow (#1141)
Updated the version of the Anchore scan action to improve code analysis capabilities.

Co-authored-by: Konstantin Koval
2024-12-14 19:57:46 +02:00
Kostiantyn
8f989df30a Another fix for the scheduled image build workflow for tag case (#1137)
* Try to fix the incorrect tag processing

* more debug code

* try with context=git

* hopefully, final debug

* the final commit with no debug code

---------

Co-authored-by: Konstantin Koval
2024-12-01 18:55:53 +02:00
Kostiantyn
6c020cc1f9 Enhance Codecov integration (#1136)
* 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
2024-11-25 16:25:38 +02:00
Kostiantyn
54669fb0a8 A new try to fix the building tagged image in the scope of scheduled run (#1133)
* test putting '"' to make the resulting JSON correct

* revert the testing code and move the fixed line to its final location

---------

Co-authored-by: Konstantin Koval
2024-11-21 20:30:05 +02:00
Googol Lee
772129dbeb Remove continue-on-error: true because it hides errors. (#1129)
* Add test for the workflow.

* Remove continue-on-error.

* Remove always failing test.

* Fix the hidden failure.

* Regenerated.
2024-11-19 19:03:19 +01:00
Kostiantyn
9d7963151b Bump codecov-action in Tests workflow from 4 to 5 (#1121)
Co-authored-by: Konstantin Koval
2024-11-16 17:29:49 +02:00
Kostiantyn
535a3a744c Fix the config builder job for scheduled docker build workflow (#1120)
* try to fix by removing ''

* add source data for the debug

* Remove debug code

* Move the event logging before the `case`

---------

Co-authored-by: Konstantin Koval
2024-11-15 21:36:00 +02:00
Kostiantyn
7a59f3445f Fix scheduled docker build for the latest tagged commit (#1116)
* Try to fetch all history

* more debug output

* The final commit

---------

Co-authored-by: Konstantin Koval
2024-11-08 17:32:15 +02:00
Kostiantyn
0fb6636ead Switch all images to the new registry (#1109)
* Switch all images to the new registry

* Update compose files

* Update Readme

* Fix several merge issues.

---------

Co-authored-by: Konstantin Koval
2024-11-03 08:42:37 +02:00
Kostiantyn
0d5225e542 Push dependencies image to the new registry (#1108)
This is the 1st of 2 PRs to migrate to the new Docker registry, where we have more control over the images and are able to manage them.
The new registry is https://hub.docker.com/u/photoview

---------

Co-authored-by: Konstantin Koval 
Co-authored-by: viktorstrate <viktorstrate@gmail.com>
2024-11-02 18:52:46 +02:00
Googol Lee
7b69f247d3 Fix gqlgen (#1105) 2024-11-02 17:05:29 +01:00
dependabot[bot]
1a861d9388 Bump anchore/scan-action from 4 to 5 in /.github/workflows (#1095)
Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 4 to 5.
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anchore/scan-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: anchore/scan-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-14 21:12:00 +03:00
Kostiantyn
87acd54291 Fix ESLint step in CI - part 2 (#1086)
* 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>
2024-10-04 11:56:17 +02:00
Kostiantyn
ff009a6ae6 Set $NODE_ENV according to the image purpose during Docker build (#1088)
* 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>
2024-10-04 11:20:49 +02:00
Kostiantyn
7057643b5d Fix ESLint step in UI testing job and add CodeCov tokens (#1084)
* Add missing script line back to the `package.json`

* Set CodeCov token for coverage upload steps

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-03 18:03:50 +02:00
Kostiantyn
bf765abde4 Fetch all tags during checkout (#1072)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-03 13:13:59 +02:00
Kostiantyn
dee3a151e9 Update GitHub workflows with various improvements (#1028)
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
2024-10-01 15:50:44 +03:00
Googol Lee
340c181442 Use self-building dependencies and update the code with imagemagick. (#1053) 2024-09-17 15:02:23 +02:00
Googol Lee
4b678f201d Fix cache pushing problem. (#1052) 2024-09-13 16:11:29 +02:00
Googol Lee
4655684b49 Fix cache flag in dependencies workflow. (#1050) 2024-09-13 13:41:39 +02:00
Googol Lee
49ae7d17df Fix cache options. (#1049) 2024-09-13 11:44:30 +02:00
Googol Lee
17b27d7e60 Add build workflow for workers. (#1047) 2024-09-12 19:09:03 +02:00
Googol Lee
85c1e52b06 Use alpine as base images. (#1033) 2024-09-02 18:35:45 +02:00
Googol Lee
ad13172a32 Switch to Debian testing and imagemagick. (#1021) 2024-08-29 10:30:06 +02:00
Googol Lee
bb66a8b791 Fix release version and date in UI. (#1025) 2024-08-27 21:46:29 +02:00
Googol Lee
ebcbe6c057 Update workflow using Dockerfile. (#1003) 2024-08-03 23:17:54 +02:00
Kostiantyn
df9af39a16 Validate incoming GPS data (#951)
* 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
2024-06-29 10:32:48 +03:00
Kostiantyn
55d6097cc1 Update GO version in the go.mod and read it by the job to setup the testing environment for unit tests (#980)
Co-authored-by: Konstantin Koval
2024-06-28 14:59:31 +02:00
Googol Lee
e36b09753a Bump go version and modules. (#976)
* 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.
2024-06-28 10:10:18 +03:00
viktorstrate
5c1f8b4632 clean up build action 2023-07-10 22:49:01 +02:00
viktorstrate
b2a79a4c9d update and simplify github build action 2023-07-10 18:57:50 +02:00
viktorstrate
831e24f654 Fix API tests 2022-07-08 17:44:03 +02:00
viktorstrate
214aa389fb Fix Docker builds 2022-07-08 16:49:46 +02:00
viktorstrate
00e436a518 Add tests for album path 2021-09-27 20:59:41 +02:00
feinedsquirrel
52c2c76169 update Kagami/go-face target commit and new deps for it 2021-06-04 14:45:33 -06:00
Viktor Strate Kløvedal
9da489506b Remove dependabot 2021-05-01 10:10:20 +02:00
viktorstrate
d09d5f6ca0 Improve codeql action + fix test db clean 2021-04-24 19:12:45 +02:00
viktorstrate
26ef725b78 Use codecov-action instead 2021-04-23 22:01:52 +02:00
viktorstrate
777747d5e7 ghaction ui test fix cmd + add cache 2021-04-23 21:51:47 +02:00
viktorstrate
7b2720791e integrate codecov 2021-04-23 21:46:01 +02:00
viktorstrate
6bdd73c181 ghaction test dbs try localhost 2021-04-23 21:19:45 +02:00
viktorstrate
435a9e0ab1 Add ports to ghaction test services 2021-04-23 21:14:11 +02:00
viktorstrate
d7ad507987 Fix postgres + add api test cache 2021-04-23 21:07:32 +02:00
viktorstrate
e77f1bcd47 Fix mariadb env vars ghaction tests 2021-04-23 21:00:11 +02:00