mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-02-15 01:02:48 +00:00
fix(workflow): fix workflow not to double build the webapp image when running unit test (#9210)
This commit is contained in:
parent
93309bf4f3
commit
91fac6f7c6
9
.github/workflows/test-webapp.yml
vendored
9
.github/workflows/test-webapp.yml
vendored
@ -51,8 +51,8 @@ jobs:
|
||||
|
||||
- name: Webapp | Build 'test' image
|
||||
run: |
|
||||
docker build --target test -f webapp/Dockerfile -t "ocelotsocialnetwork/webapp:test" .
|
||||
docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar
|
||||
docker build --target test -f webapp/Dockerfile -t "ghcr.io/ocelot-social-community/ocelot-social/webapp:test" .
|
||||
docker save "ghcr.io/ocelot-social-community/ocelot-social/webapp:test" > /tmp/webapp.tar
|
||||
|
||||
- name: Cache docker image
|
||||
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4.0.2
|
||||
@ -102,9 +102,8 @@ jobs:
|
||||
cp webapp/.env.template webapp/.env
|
||||
cp backend/.env.template backend/.env
|
||||
|
||||
- name: backend | docker compose
|
||||
# doesn't work without the --build flag - this either means we should not load the cached images or cache the correct image
|
||||
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp --build
|
||||
- name: Start webapp container
|
||||
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp
|
||||
|
||||
- name: webapp | Unit tests incl. coverage check
|
||||
run: docker compose exec -T webapp yarn test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user