Skip to content

Commit

Permalink
DO NOT MERGE
Browse files Browse the repository at this point in the history
  run only unit tests
  • Loading branch information
taratatach committed Jul 15, 2024
1 parent 9d796c8 commit 76a1425
Showing 1 changed file with 175 additions and 175 deletions.
350 changes: 175 additions & 175 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,180 +121,180 @@ jobs:
COZY_DESKTOP_FS: ${{ matrix.fs }}
run: yarn test:unit --forbid-only

integration:
needs: cleanup
runs-on: macos-12
name: Integration tests
strategy:
matrix:
fs: ['APFS']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
${{ github.workspace }}/node_modules
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup golang
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup python
run: pip install setuptools
- name: Setup CouchDB
id: setup-couchdb
uses: ./.github/actions/setup-couchdb
with:
couchdb-version: ${{ env.COUCHDB_VERSION }}
couchdb-user: ${{ env.COUCHDB_USER }}
couchdb-password: ${{ env.COUCHDB_PASSWORD }}
- name: Setup cozy-stack
uses: ./.github/actions/setup-cozy-stack
with:
couchdb-url: ${{ steps.setup-couchdb.outputs.couchdb-url }}
- name: Setup DNS resolution for .localhost
uses: ./.github/actions/setup-dnsmasq
- name: Setup local env
env:
COZY_DESKTOP_FS: ${{ matrix.fs }}
run: |
hdiutil create -megabytes 50 -fs "$COZY_DESKTOP_FS" -volname cozy-desktop "$COZY_DESKTOP_DIR"
hdiutil attach "${COZY_DESKTOP_DIR}.dmg" -mountpoint "$COZY_DESKTOP_DIR"
echo "NODE_ENV=test" > "${{ github.workspace }}/.env.test"
- name: Install dependencies
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
run: yarn install:all
- name: Start Xvfb
run: sudo Xvfb :99 -ac -screen 0 1024x768x8 &
- name: Integration tests
env:
COZY_DESKTOP_FS: ${{ matrix.fs }}
run: yarn test:integration --forbid-only
#integration:
# needs: cleanup
# runs-on: macos-12
# name: Integration tests
# strategy:
# matrix:
# fs: ['APFS']
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# - name: Cache node modules
# id: cache-node-modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: |
# ${{ github.workspace }}/node_modules
# ~/.cache/electron
# ~/.cache/electron-builder
# key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
# - name: Setup node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Setup golang
# uses: actions/setup-go@v3
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Setup python
# run: pip install setuptools
# - name: Setup CouchDB
# id: setup-couchdb
# uses: ./.github/actions/setup-couchdb
# with:
# couchdb-version: ${{ env.COUCHDB_VERSION }}
# couchdb-user: ${{ env.COUCHDB_USER }}
# couchdb-password: ${{ env.COUCHDB_PASSWORD }}
# - name: Setup cozy-stack
# uses: ./.github/actions/setup-cozy-stack
# with:
# couchdb-url: ${{ steps.setup-couchdb.outputs.couchdb-url }}
# - name: Setup DNS resolution for .localhost
# uses: ./.github/actions/setup-dnsmasq
# - name: Setup local env
# env:
# COZY_DESKTOP_FS: ${{ matrix.fs }}
# run: |
# hdiutil create -megabytes 50 -fs "$COZY_DESKTOP_FS" -volname cozy-desktop "$COZY_DESKTOP_DIR"
# hdiutil attach "${COZY_DESKTOP_DIR}.dmg" -mountpoint "$COZY_DESKTOP_DIR"
# echo "NODE_ENV=test" > "${{ github.workspace }}/.env.test"
# - name: Install dependencies
# if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
# run: yarn install:all
# - name: Start Xvfb
# run: sudo Xvfb :99 -ac -screen 0 1024x768x8 &
# - name: Integration tests
# env:
# COZY_DESKTOP_FS: ${{ matrix.fs }}
# run: yarn test:integration --forbid-only

scenarios:
needs: cleanup
runs-on: macos-12
name: Scenarios
strategy:
matrix:
stopped_client: ['', 'STOPPED']
fs: ['APFS', 'HFS+']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
${{ github.workspace }}/node_modules
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup golang
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup python
run: pip install setuptools
- name: Setup CouchDB
id: setup-couchdb
uses: ./.github/actions/setup-couchdb
with:
couchdb-version: ${{ env.COUCHDB_VERSION }}
couchdb-user: ${{ env.COUCHDB_USER }}
couchdb-password: ${{ env.COUCHDB_PASSWORD }}
- name: Setup cozy-stack
uses: ./.github/actions/setup-cozy-stack
with:
couchdb-url: ${{ steps.setup-couchdb.outputs.couchdb-url }}
- name: Setup DNS resolution for .localhost
uses: ./.github/actions/setup-dnsmasq
- name: Setup local env
env:
COZY_DESKTOP_FS: ${{ matrix.fs }}
run: |
until hdiutil create -megabytes 100 -fs "$COZY_DESKTOP_FS" -volname cozy-desktop "$COZY_DESKTOP_DIR"
do
sleep 1
done
until hdiutil attach "${COZY_DESKTOP_DIR}.dmg" -mountpoint "$COZY_DESKTOP_DIR"
do
sleep 1
done
echo "NODE_ENV=test" > "${{ github.workspace }}/.env.test"
- name: Install dependencies
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
run: yarn install:all
- name: Start Xvfb
run: sudo Xvfb :99 -ac -screen 0 1024x768x8 &
- name: Scenarios
env:
STOPPED_CLIENT: ${{ matrix.stopped_client == 'STOPPED' }}
COZY_DESKTOP_FS: ${{ matrix.fs }}
run: yarn test:scenarios --forbid-only
#scenarios:
# needs: cleanup
# runs-on: macos-12
# name: Scenarios
# strategy:
# matrix:
# stopped_client: ['', 'STOPPED']
# fs: ['APFS', 'HFS+']
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# - name: Cache node modules
# id: cache-node-modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: |
# ${{ github.workspace }}/node_modules
# ~/.cache/electron
# ~/.cache/electron-builder
# key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
# - name: Setup node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Setup golang
# uses: actions/setup-go@v3
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Setup python
# run: pip install setuptools
# - name: Setup CouchDB
# id: setup-couchdb
# uses: ./.github/actions/setup-couchdb
# with:
# couchdb-version: ${{ env.COUCHDB_VERSION }}
# couchdb-user: ${{ env.COUCHDB_USER }}
# couchdb-password: ${{ env.COUCHDB_PASSWORD }}
# - name: Setup cozy-stack
# uses: ./.github/actions/setup-cozy-stack
# with:
# couchdb-url: ${{ steps.setup-couchdb.outputs.couchdb-url }}
# - name: Setup DNS resolution for .localhost
# uses: ./.github/actions/setup-dnsmasq
# - name: Setup local env
# env:
# COZY_DESKTOP_FS: ${{ matrix.fs }}
# run: |
# until hdiutil create -megabytes 100 -fs "$COZY_DESKTOP_FS" -volname cozy-desktop "$COZY_DESKTOP_DIR"
# do
# sleep 1
# done
# until hdiutil attach "${COZY_DESKTOP_DIR}.dmg" -mountpoint "$COZY_DESKTOP_DIR"
# do
# sleep 1
# done
# echo "NODE_ENV=test" > "${{ github.workspace }}/.env.test"
# - name: Install dependencies
# if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
# run: yarn install:all
# - name: Start Xvfb
# run: sudo Xvfb :99 -ac -screen 0 1024x768x8 &
# - name: Scenarios
# env:
# STOPPED_CLIENT: ${{ matrix.stopped_client == 'STOPPED' }}
# COZY_DESKTOP_FS: ${{ matrix.fs }}
# run: yarn test:scenarios --forbid-only

build:
needs: cancel
runs-on: macos-12
name: Build packages
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
${{ github.workspace }}/node_modules
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup python
run: pip install setuptools
- name: Install dependencies
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
run: yarn install:all
- name: Build assets
run: yarn build
- name: Build package
uses: ./.github/actions/build-and-publish
with:
gh-token: "${{ secrets.github_token }}"
mac-cert: "${{ secrets.mac_cert }}"
mac-cert-password: "${{ secrets.mac_cert_password }}"
apple-id: "${{ secrets.apple_id }}"
apple-id-password: "${{ secrets.apple_id_password }}"
apple-team-id: "${{ secrets.apple_team_id }}"
- name: Save artifacts
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: Binaries
path: |
${{ github.workspace }}/dist/latest-mac.yml
${{ github.workspace }}/dist/Cozy[- ]Drive[- ]*.dmg
${{ github.workspace }}/dist/Cozy[- ]Drive[- ]*-mac.zip
retention-days: 5
#build:
# needs: cancel
# runs-on: macos-12
# name: Build packages
# steps:
# - uses: actions/checkout@v3
# - name: Cache node modules
# id: cache-node-modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: |
# ${{ github.workspace }}/node_modules
# ~/.cache/electron
# ~/.cache/electron-builder
# key: ${{ runner.os }}-v${{ env.NODE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
# - name: Setup node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Setup python
# run: pip install setuptools
# - name: Install dependencies
# if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
# run: yarn install:all
# - name: Build assets
# run: yarn build
# - name: Build package
# uses: ./.github/actions/build-and-publish
# with:
# gh-token: "${{ secrets.github_token }}"
# mac-cert: "${{ secrets.mac_cert }}"
# mac-cert-password: "${{ secrets.mac_cert_password }}"
# apple-id: "${{ secrets.apple_id }}"
# apple-id-password: "${{ secrets.apple_id_password }}"
# apple-team-id: "${{ secrets.apple_team_id }}"
# - name: Save artifacts
# if: ${{ github.event_name == 'pull_request' }}
# uses: actions/upload-artifact@v3
# with:
# name: Binaries
# path: |
# ${{ github.workspace }}/dist/latest-mac.yml
# ${{ github.workspace }}/dist/Cozy[- ]Drive[- ]*.dmg
# ${{ github.workspace }}/dist/Cozy[- ]Drive[- ]*-mac.zip
# retention-days: 5

0 comments on commit 76a1425

Please sign in to comment.