Skip to content

Commit

Permalink
chore: Replace travis by github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Aug 7, 2024
1 parent 9a7b7bf commit 36423e2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 182 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Deploy Cozy-ui
on:
push:
branches: [ master ]
pull_request:
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install packages
run: yarn install --frozen-lockfile --ignore-optional
- name: Lint
run: yarn lint
- name: Generate Sprite and Palette
run: yarn makeSpriteAndPalette
- name: Build JS
run: yarn build
- name: Build CSS
run: yarn build:css:all
- name: Build docs
run: |
yarn build:doc:react
yarn build:doc:kss
- name: Tests without snapshots
run: yarn test:noSnapshots
- name: Tests snapshots
run: yarn test:snapshots
# - name: Bundlemon
# run: yarn bundlemon
- name: Argos - Prepare env
run: |
yarn add puppeteer@"21.11.0" --dev --exact
mkdir ./screenshots
- name: Argos - Create desktop screenshots
run: yarn screenshots --mode react --viewport desktop --screenshot-dir ./screenshots/reactDesktop
- name: Argos - Create mobile screenshots
run: yarn screenshots --mode react --viewport 300x600 --screenshot-dir ./screenshots/reactMobile
- name: Argos - Create kss screenshots
run: yarn screenshots --mode kss --screenshot-dir ./screenshots/kss
- name: Argos - Upload all screenshots
run: |
yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID --ignore ''
yarn argos:upload --parallel screenshots/reactMobile/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID --ignore ''
yarn argos:upload --parallel screenshots/kss/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID --ignore ''
- name: Deploy
if: ${{ github.ref_name == 'master' }}
run: |
yarn deploy:doc --username cozycloud --email [email protected] --repo https://cozy-bot:[email protected]/cozy/cozy-ui.git
yarn semantic-release
182 changes: 0 additions & 182 deletions .travis.yml

This file was deleted.

0 comments on commit 36423e2

Please sign in to comment.