chore: simplify build/integration workflow (#8512)
Some checks failed
Some checks failed
This commit is contained in:
parent
c73ada6264
commit
943281d471
1 changed files with 24 additions and 37 deletions
61
.github/workflows/default.yml
vendored
61
.github/workflows/default.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue