Skip to content

Commit

Permalink
Merge pull request #1012 from cozy/chore/VER-890
Browse files Browse the repository at this point in the history
chore: Add CI with Github Actions
  • Loading branch information
Merkur39 authored Oct 16, 2024
2 parents b3f34f2 + 5730b1d commit ba8d95d
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 112 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI/CD

on:
pull_request:
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'

env:
MATTERMOST_CHANNEL: '{"dev":"contacts","beta":"contacts,publication","stable":"contacts,publication"}'
MATTERMOST_HOOK_URL: ${{ secrets.MATTERMOST_HOOK_URL }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
BUNDLEMON_PROJECT_ID: ${{ secrets.BUNDLEMON_PROJECT_ID }}

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: BundleMon
uses: lironer/bundlemon-action@v1
- name: Set SSH for downcloud
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DOWNCLOUD_SSH_KEY }}
- name: Publish
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
run: yarn run cozyPublish --yes
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions id_rsa_downcloud_contacts.enc

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
"build": "cozy-scripts build --browser --barV7 false",
"watch": "cozy-scripts watch --browser --barV7 false",
"start": "cozy-scripts start --browser --barV7 false",
"deploy": "cozy-app-publish --token $REGISTRY_TOKEN --build-dir 'build/' --prepublish downcloud --postpublish mattermost",
"cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --build-dir 'build/' --prepublish downcloud --postpublish mattermost",
"test": "cozy-scripts test",
"stack:docker:dev": "docker run --rm -it -p 8080:8080 -p 5984:5984 -e COZY_DISABLE_CSP=1 -v \"$(pwd)/build\":/data/cozy-app/app cozy/cozy-app-dev",
"stack:docker:prod": "docker run --rm -it -p 8080:8080 -p 5984:5984 -v \"$(pwd)/build\":/data/cozy-app/app cozy/cozy-app-dev",
"cozyPublish": "git fetch origin ${DEPLOY_BRANCH:-build}:${DEPLOY_BRANCH:-build} && cozy-scripts publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})",
"fixtures": "ACH import fixtures/contacts.json",
"fixtures:drop": "ACH drop io.cozy.contacts io.cozy.contacts.groups",
"fixtures:massive": "ACH import fixtures/massiveContacts.json",
Expand Down Expand Up @@ -43,7 +42,7 @@
"@typescript-eslint/parser": "^5.54.0",
"babel-preset-cozy-app": "^2.1.0",
"browser-resolve": "^2.0.0",
"bundlemon": "2.0.1",
"bundlemon": "1.4.0",
"cozy-app-publish": "^0.34.0",
"cozy-jobs-cli": "^2.3.2",
"cozy-scripts": "^8.3.0",
Expand Down
65 changes: 8 additions & 57 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3469,30 +3469,13 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3"
integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==

axios-retry@^3.3.1:
version "3.4.0"
resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.4.0.tgz#f464dbe9408e5aa78fa319afd38bb69b533d8854"
integrity sha512-VdgaP+gHH4iQYCCNUWF2pcqeciVOdGrBBAYUfTY+wPcO5Ltvp/37MLFNCmJKo7Gj3SHvCSdL8ouI1qLYJN3liA==
dependencies:
"@babel/runtime" "^7.15.4"
is-retry-allowed "^2.2.0"

axios@^0.21.1:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
dependencies:
follow-redirects "^1.14.0"

axios@^1.1.3:
version "1.3.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.2.tgz#7ac517f0fa3ec46e0e636223fd973713a09c72b3"
integrity sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

[email protected]:
version "7.0.0-bridge.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
Expand Down Expand Up @@ -4062,31 +4045,14 @@ builtins@^1.0.3:
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==

bundlemon-utils@^1.0.0, bundlemon-utils@^1.2.0:
bundlemon-utils@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/bundlemon-utils/-/bundlemon-utils-1.2.0.tgz#439f00930009293c9ce7c310716626a703560039"
integrity sha512-yC8DPG8y6WyBxLYbwRs6yydPtcsWfgGmbUI8+LDPUa+zcMVCGSZOszysJ7SJGlnN7dI7PW+8Ed7RtWpOZI2hOQ==
dependencies:
bytes "^3.1.0"

[email protected]:
version "2.0.1"
resolved "https://registry.yarnpkg.com/bundlemon/-/bundlemon-2.0.1.tgz#2582dbe39ac1950e0f61f1b3fabb70213dcf042f"
integrity sha512-Mo3A9y6hdLjBPZd3O57xz4zJ0F9DMHiCL9dWdjwAn6mWISUSeaJF1fsNsKTGmOy/jEMzWHvkuidm0tFL0Fq04g==
dependencies:
axios "^1.1.3"
axios-retry "^3.3.1"
brotli-size "^4.0.0"
bundlemon-utils "^1.2.0"
bytes "^3.1.2"
chalk "^4.0.0"
commander "^9.4.0"
cosmiconfig "^7.0.1"
gzip-size "^6.0.0"
micromatch "^4.0.5"
yup "^0.32.11"

bundlemon@^1.3.2:
[email protected], bundlemon@^1.3.2:
version "1.4.0"
resolved "https://registry.yarnpkg.com/bundlemon/-/bundlemon-1.4.0.tgz#5593e00cd913e638f69a489d4d97a9abecdac85d"
integrity sha512-A5mzeMZrnUzKNNo8ng1PFlxZr57XM2HDsaX07kJ1u59BDWn2JFYNeUIUSXhmLdoqBHK9Ln7wTLXDnoqOlcJP5A==
Expand All @@ -4107,7 +4073,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==

[email protected], bytes@^3.1.0, bytes@^3.1.2:
[email protected], bytes@^3.1.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
Expand Down Expand Up @@ -4662,11 +4628,6 @@ commander@^8.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==

commander@^9.4.0:
version "9.5.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
Expand Down Expand Up @@ -4862,7 +4823,7 @@ cosmiconfig@^5.0.0:
js-yaml "^3.13.1"
parse-json "^4.0.0"

cosmiconfig@^7.0.0, cosmiconfig@^7.0.1:
cosmiconfig@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==
Expand Down Expand Up @@ -7353,7 +7314,7 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.15.0:
follow-redirects@^1.0.0, follow-redirects@^1.14.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
Expand Down Expand Up @@ -8737,11 +8698,6 @@ is-regex@^1.0.4, is-regex@^1.1.4:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"

is-retry-allowed@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d"
integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==

is-set@^2.0.1, is-set@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec"
Expand Down Expand Up @@ -10560,7 +10516,7 @@ micromatch@^3.1.10, micromatch@^3.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.2"

micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5:
micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
Expand Down Expand Up @@ -10820,9 +10776,9 @@ msgpack5@^4.0.2:
readable-stream "^2.3.6"
safe-buffer "^5.1.2"

"mui-bottom-sheet@git+https://github.com/cozy/mui-bottom-sheet.git#v1.0.9":
"mui-bottom-sheet@https://github.com/cozy/mui-bottom-sheet.git#v1.0.9":
version "1.0.8"
resolved "git+https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c"
resolved "https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c"
dependencies:
"@juggle/resize-observer" "^3.1.3"
jest-environment-jsdom-sixteen "^1.0.3"
Expand Down Expand Up @@ -12327,11 +12283,6 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
Expand Down

0 comments on commit ba8d95d

Please sign in to comment.