chore: simplify build/integration workflow (#8512)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Demo (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

This commit is contained in:
Michael Geers 2023-06-18 13:49:49 +02:00 • committed by GitHub
parent c73ada6264
commit 943281d471
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,28 +55,11 @@ jobs:
node-version: "18"
cache: "npm"
- name: Install UI
run: make install-ui
- name: Build UI
run: make ui
- run: mkdir dist && touch dist/empty
- name: Build
run: make build
- name: Cache dist
uses: actions/cache/save@v3
id: cache-dist
with:
path: dist
key: ${{ runner.os }}-${{ github.sha }}-dist
- name: Upload
uses: actions/upload-artifact@v3
with:
name: evcc-binary
path: ./evcc
test:
name: Test
runs-on: ubuntu-latest
@ -136,6 +119,16 @@ jobs:
- name: Test
run: make test-ui
- name: Build UI
run: make ui
- name: Cache dist
uses: actions/cache/save@v3
id: cache-dist
with:
path: dist
key: ${{ runner.os }}-${{ github.sha }}-dist
- name: Porcelain
run: |
test -z "$(git status --porcelain)" || (git status; git diff; false)
@ -143,35 +136,29 @@ jobs:
integration:
name: Integration
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
- uses: erezrokah/setup-go@feat/add_cache_prefix
with:
go-version: ^1.20
cache-key-prefix: integration-cache-
id: go
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
- name: Install npm
run: npm ci
- name: Build UI
run: make install-ui ui
- run: npx playwright install --with-deps chromium
- name: Build Go
run: make build
- name: Wait for Build
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
check-name: Build
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- uses: actions/download-artifact@v3
with:
name: evcc-binary
- name: Make executable
run: chmod +x evcc
- name: Install playwright
run: npx playwright install --with-deps chromium
- name: Run tests
run: npx playwright test
@ -181,4 +168,4 @@ jobs:
with:
name: playwright-report
path: playwright-report/
retention-days: 30
retention-days: 14