Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
sneko committed Feb 20, 2024
1 parent 0284009 commit f956401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ simulate-cicd-with-push:
# - for now the cache does not work and even if there is https://github.com/sp-ricard-valverde/github-act-cache-server it's a bit overheaded for a ponctual simulation
# - using "--bind" is not ideal because `npm` will recreate the whole "node_modules" on the host, so we have to do `npm install` then (it would make sense for a computer dedicated to this)
# - so we use "--reuse" that keeps using the existing docker container if any, to avoid downloading a new time each dependency. If you get weird behavior you can still remove the docker container from `act` and restart the command
# - we inject a meaningful commit SHA into "SOURCE_VERSION" otherwise a Jest process will fail since we use it for Sentry stuff in the Next.js app
# - we inject a meaningful commit SHA into "CC_COMMIT_ID" otherwise a Jest process will fail since we use it for Sentry stuff in the Next.js app
# - the default image is missing browsers stuff for e2e tests and `docker-compose`, we added 2 steps in the workflow to not deal with a custom image not officially supported (and the full official image is around 15GB... we don't want that either)
# - `.actrc` breaks `act` commands in specific situations, we avoid using it to factorize commands
act push --reuse --env-file .github/act/.env --env SOURCE_VERSION="$(git rev-parse @{upstream})" --eventpath .github/act/event.json
act push --reuse --env-file .github/act/.env --env CC_COMMIT_ID="$(git rev-parse @{upstream})" --eventpath .github/act/event.json
8 changes: 4 additions & 4 deletions src/utils/app-version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ describe('app-version', () => {
});
});

describe.skip('as in Scalingo environment', () => {
// Simulate the commit SHA Scalingo provides
process.env.SOURCE_VERSION = 'bedf63af57c32f3750e2d0f466066fcf549960f8';
describe.skip('as in Clever Cloud environment', () => {
// Simulate the commit SHA Clever Cloud provides
process.env.CC_COMMIT_ID = 'bedf63af57c32f3750e2d0f466066fcf549960f8';

describe('getFallbackCommitSha()', () => {
it('should return the environment variable value', async () => {
const commitSha = await getFallbackCommitSha();

expect(commitSha).toStrictEqual(process.env.SOURCE_VERSION);
expect(commitSha).toStrictEqual(process.env.CC_COMMIT_ID);
});
});

Expand Down

0 comments on commit f956401

Please sign in to comment.