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

only produce artifact if Ci passes unit tests / auto-release when a tag is pushed. #820

Merged
merged 6 commits into from
Nov 15, 2022
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
63 changes: 0 additions & 63 deletions .github/workflows/cypress.yml

This file was deleted.

105 changes: 92 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,96 @@ env:
KEYCHAIN_PASSWORD: silabs

jobs:
build:
cypress-zigbee:
name: Cypress UI tests with Zigbee data
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: sudo ./src-script/install-packages-ubuntu
- run: sudo apt-get install --fix-missing xvfb
- run: npm ci
- run: npm run version-stamp
- run: npm rebuild canvas --update-binary
- run: npm rebuild libxmljs --update-binary
- run: npm run build-spa
- run: xvfb-run -a npm run test:e2e-ci

cypress-matter:
name: Cypress UI tests with Matter data
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: sudo ./src-script/install-packages-ubuntu
- run: sudo apt-get install --fix-missing xvfb
- run: npm ci
- run: npm run version-stamp
- run: npm rebuild canvas --update-binary
- run: npm rebuild libxmljs --update-binary
- run: npm run build-spa
- run: xvfb-run -a npm run test:e2e-matter-ci

generate-and-backend-tests:
name: Generation and back-end tests
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [16.x]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: sudo apt-get update
- run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev libxml2-utils
- run: node --version
- run: npm --version
- run: npm ci
- run: npm run metafile-check
- run: npm run version-stamp
- run: npm rebuild canvas --update-binary
- run: npm rebuild libxmljs --update-binary
- run: npm run lic
- run: npm run build-spa
- run: npm run lint
- run: npm run xml-validate
- run: npm run self-check
- run: npm run test:unit
- run: npm run test:gen

build-zap:
name: Build ZAP
needs: [cypress-zigbee, cypress-matter, generate-and-backend-tests]
runs-on: ${{ matrix.os }}

# Platforms to build on/for
strategy:
matrix:
os: [macos-11, ubuntu-latest]
os: [macos-11, ubuntu-22.04]
fail-fast: false

steps:
Expand Down Expand Up @@ -231,20 +314,16 @@ jobs:

release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
needs: [build-zap]
name: Create Github Release
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
- name: List downloaded files
run: ls -R
- name: Creating Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
zap-linux-deb/zap-linux.deb
zap-linux-rpm/zap-linux.rpm
zap-linux-zip/zap-linux.zip
zap-mac-zip/zap-mac.zip
zap-win-zip/zap-win.zip
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
prerelease: ${{ endsWith(github.ref, 'nightly') }}
artifacts: 'zap-linux-deb/zap-linux.deb, zap-linux-rpm/zap-linux.rpm, zap-linux-zip/zap-linux.zip, zap-mac-zip/zap-mac.zip, zap-win-zip/zap-win.zip'
44 changes: 0 additions & 44 deletions .github/workflows/zap.yml

This file was deleted.