-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
221 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Cache Argos desktop" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache Argos desktop | ||
id: cache-argos-desktop | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-argos-desktop | ||
with: | ||
path: | | ||
${{ github.workspace }}/screenshots/reactDesktop | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Cache Argos kss" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache Argos kss | ||
id: cache-argos-kss | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-argos-kss | ||
with: | ||
path: | | ||
${{ github.workspace }}/screenshots/kss | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Cache Argos mobile" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache Argos mobile | ||
id: cache-argos-mobile | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-argos-mobile | ||
with: | ||
path: | | ||
${{ github.workspace }}/screenshots/reactMobile | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Cache builds" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache builds | ||
id: cache-builds | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-builds | ||
with: | ||
path: | | ||
${{ github.workspace }}/react/Icon/icons-sprites.js | ||
${{ github.workspace }}/react/palette.js | ||
${{ github.workspace }}/transpiled | ||
${{ github.workspace }}/dist | ||
${{ github.workspace }}/build | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Read builds cache" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Read builds cache | ||
id: cache-builds-read | ||
uses: actions/cache/restore@v3 | ||
env: | ||
cache-name: cache-builds | ||
with: | ||
path: | | ||
${{ github.workspace }}/react/Icon/icons-sprites.js | ||
${{ github.workspace }}/react/palette.js | ||
${{ github.workspace }}/transpiled | ||
${{ github.workspace }}/dist | ||
${{ github.workspace }}/build | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Setup Argos" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/actions/setup_modules | ||
- name: Cache puppeteer | ||
id: cache-node-modules-puppeteer | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules-puppeteer | ||
with: | ||
path: | | ||
${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} | ||
- name: Argos - Prepare env | ||
if: ${{ steps.cache-node-modules-puppeteer.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
yarn add puppeteer@"21.11.0" --dev --exact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Setup modules" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} | ||
- name: Install packages | ||
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: yarn install --frozen-lockfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,45 +8,111 @@ env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_modules | ||
prepareArgos: | ||
needs: [install] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_argos | ||
build: | ||
needs: [install] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
# - name: Install packages | ||
# run: yarn install --frozen-lockfile | ||
# - name: Lint | ||
# run: yarn lint | ||
# - name: Build JS/CSS/DOCS | ||
# run: yarn build:all | ||
# - 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: | | ||
# UUID=$(uuidgen) | ||
# yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore '' | ||
# yarn argos:upload --parallel screenshots/reactMobile/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore '' | ||
# yarn argos:upload --parallel screenshots/kss/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --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 | ||
- uses: ./.github/actions/setup_modules | ||
- uses: ./.github/actions/build_cache | ||
- 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 | ||
test: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_modules | ||
- uses: ./.github/actions/build_cache_read | ||
- name: Tests without snapshots | ||
run: yarn test:noSnapshots | ||
- name: Tests snapshots | ||
run: yarn test:snapshots | ||
# - name: Bundlemon | ||
# run: yarn bundlemon | ||
argosDesktop: | ||
needs: [prepareArgos, build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_argos | ||
- uses: ./.github/actions/build_cache | ||
- uses: ./.github/actions/build_argos_desktop_cache | ||
- name: Argos - Create desktop screenshots | ||
run: | | ||
mkdir ./screenshots | ||
yarn screenshots --mode react --viewport desktop --screenshot-dir ./screenshots/reactDesktop | ||
argosMobile: | ||
needs: [prepareArgos, build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_argos | ||
- uses: ./.github/actions/build_cache | ||
- uses: ./.github/actions/build_argos_mobile_cache | ||
- name: Argos - Create mobile screenshots | ||
run: | | ||
mkdir ./screenshots | ||
yarn screenshots --mode react --viewport 300x600 --screenshot-dir ./screenshots/reactMobile | ||
argosKss: | ||
needs: [prepareArgos, build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_argos | ||
- uses: ./.github/actions/build_cache | ||
- uses: ./.github/actions/build_argos_kss_cache | ||
- name: Argos - Create kss screenshots | ||
run: | | ||
mkdir ./screenshots | ||
yarn screenshots --mode kss --screenshot-dir ./screenshots/kss | ||
argosUpload: | ||
needs: [argosDesktop, argosMobile, argosKss] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_argos | ||
- uses: ./.github/actions/build_argos_desktop_cache | ||
- uses: ./.github/actions/build_argos_mobile_cache | ||
- uses: ./.github/actions/build_argos_kss_cache | ||
- name: Argos - Upload all screenshots | ||
run: | | ||
UUID=$(uuidgen) | ||
yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore '' | ||
yarn argos:upload --parallel screenshots/reactMobile/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore '' | ||
yarn argos:upload --parallel screenshots/kss/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore '' | ||
deploy: | ||
needs: [argosUpload, test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup_modules | ||
- uses: ./.github/actions/build_cache | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters