Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VO-1138] chore: Migrate to Github Actions #1559

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI/CD

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0
- 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: Build
run: yarn build # before tests since packages rely on dist/ files to be available
- name: Test
run: yarn test --runInBand
- name: Make documentation
run: yarn docs
- name: Check documentation
run: |
git diff --exit-code -- docs || (echo "Docs are not up-to-date, please run yarn docs and repush" && exit 1)
- name: Make types
run: yarn types
- name: Check types
run: git diff --exit-code || (echo "Types are not up-to-date, please run cd packages/cozy-client && yarn typecheck and repush" && exit 1)
- name: Publish to NPM
if: github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config user.name "Cozy Bot"
git config user.email "[email protected]"
git remote set-url origin https://cozy-bot:[email protected]/cozy/cozy-libs.git
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
yarn lerna publish --yes
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No risk for this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we're building the final build with node 20 in our apps yet

24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

9 changes: 3 additions & 6 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"lerna": "2.8.0",
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"version": "51.1.0",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"version": {
"conventionalCommits": true,
Expand All @@ -14,5 +10,6 @@
"publish": {
"conventionalCommits": true
}
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
"eslint-plugin-jsdoc": "15.12.2",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.25.1",
"node-gyp": "10.0.1",
"husky": "0.14.3",
"jest": "24.9.0",
"jest-environment-jsdom-sixteen": "1.0.3",
"jest-fetch-mock": "3.0.3",
"jsdoc-to-markdown": "6.0.1",
"lerna": "4.0.0",
"lerna": "8.1.9",
"react": "16.14.0",
"react-dom": "16.14.0",
"redux-mock-store": "1.5.4",
Expand All @@ -40,7 +39,7 @@
"lint": "eslint 'packages/*/src/**/*.{js,jsx}' 'packages/*/examples/**/*.{js,jsx}'",
"test": "jest",
"watch": "lerna run watch --parallel",
"build": "lerna run build --parallel",
"build": "lerna run build",
"commitmsg": "commitlint -e $GIT_PARAMS",
"clean": "rm -rf packages/*/dist",
"cleanTypes": "rm -rf packages/*/types",
Expand Down
7 changes: 0 additions & 7 deletions scripts/deploy.sh

This file was deleted.

35 changes: 0 additions & 35 deletions scripts/travis.sh

This file was deleted.

Loading
Loading