From 07bb6fa20b9feba45ba6099f97c70f505661be8c Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Sun, 3 Dec 2023 13:21:26 +0100 Subject: [PATCH] (ci) add simple GitLab CI configuration for running jest tests --- .gitlab-ci.yml | 21 +++++++++++++++++++++ jest.config.js | 1 + 2 files changed, 22 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..539746f98 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +image: node:latest + +cache: + paths: + - .yarn + - node_modules/ + +before_script: + - sed -i "s/git+ssh:\/\/git@gitlab.com:Avris\/FontAwesomePro.git/git+https:\/\/git@gitlab.com\/Avris\/FakeFontAwesomePro.git/" package.json + - make switch LANG=en + - yarn install --immutable --immutable-cache --check-cache --cache-folder .yarn + +unit-tests: + stage: test + script: + - yarn add -D jest-junit + - yarn test --ci --reporters=default --reporters=jest-junit + artifacts: + when: always + reports: + junit: junit.xml diff --git a/jest.config.js b/jest.config.js index 53c24e1a2..62f22f843 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,5 +3,6 @@ export default { // define the config global here, but fill its properties later in the individual tests config: {}, }, + testPathIgnorePatterns: ['.yarn', 'node_modules'], transform: {}, };