Skip to content

Commit

Permalink
chore: Add CI with Github Actions
Browse files Browse the repository at this point in the history
And remove Travis
  • Loading branch information
Merkur39 committed Oct 16, 2024
1 parent 45f24c9 commit 54bfe33
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 51 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":"app-store","beta":"app-store,publication","stable":"app-store,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/ssh-agent@v0.9.0
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.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "cozy-scripts build --barV7 false",
"watch": "cozy-scripts watch --barV7 false",
"start": "cozy-scripts start --barV7 false",
"cozyPublish": "npx cozy-app-publish --token $REGISTRY_TOKEN --prepublish downcloud --postpublish mattermost",
"cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --prepublish downcloud --postpublish mattermost",
"test": "cs test --verbose --coverage",
"stack:docker": "docker run --rm -it -p 8080:8080 -v \"$(pwd)/build\":/data/cozy-app/app cozy/cozy-app-dev"
},
Expand All @@ -34,6 +34,7 @@
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.54.0",
"babel-preset-cozy-app": "^2.1.0",
"bundlemon": "1.4.0",
"cozy-scripts": "^8.3.0",
"cozy-tsconfig": "^1.2.0",
"enzyme": "3.3.0",
Expand Down
23 changes: 23 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4618,6 +4618,29 @@ bundlemon-utils@^0.4.0:
dependencies:
bytes "^3.1.0"

bundlemon-utils@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/bundlemon-utils/-/bundlemon-utils-1.2.1.tgz#5585df0072c04c572a52abe0dc794578f96813ff"
integrity sha512-ydFZrI68L5j6hB9y88XGlbOp2lEwZHsDZl31ljHoi+wKE32glbuXMU0d0vQJLiR7Eq6uS0nDNYSmeoFHiV9R2g==
dependencies:
bytes "^3.1.0"

bundlemon@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/bundlemon/-/bundlemon-1.4.0.tgz#5593e00cd913e638f69a489d4d97a9abecdac85d"
integrity sha512-A5mzeMZrnUzKNNo8ng1PFlxZr57XM2HDsaX07kJ1u59BDWn2JFYNeUIUSXhmLdoqBHK9Ln7wTLXDnoqOlcJP5A==
dependencies:
axios "^0.21.1"
brotli-size "^4.0.0"
bundlemon-utils "^1.0.0"
bytes "^3.1.0"
chalk "^4.1.1"
commander "^8.0.0"
cosmiconfig "^7.0.0"
gzip-size "^6.0.0"
micromatch "^4.0.4"
yup "^0.32.11"

bundlemon@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/bundlemon/-/bundlemon-1.3.2.tgz#164a038b1f4e8f520119367d3ba3b11a2372d19d"
Expand Down

0 comments on commit 54bfe33

Please sign in to comment.