Skip to content

Commit

Permalink
upload workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ostapenko committed Nov 8, 2024
1 parent c340200 commit 0e60865
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
WPT_SERVER: "webpagetest.httparchive.org"
WPT_API_KEY: ${{ secrets.HA_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: yarn test
run: yarn run test

- name: Run WebPageTest for more websites
id: wpt-test
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests

on:
push:
branches:
- main
paths:
- "src/technologies/*.json"
- "src/categories.json"
- "src/groups.json"
workflow_dispatch:

jobs:
test:
name: Test and upload to GCP
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Install dependencies
run: yarn install

- name: Validate
run: yarn run validate

- name: Run WebPageTest with unit tests
id: unit-test
env:
WPT_SERVER: "webpagetest.httparchive.org"
WPT_API_KEY: ${{ secrets.HA_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: yarn run test

- name: Upload to GCP
id: upload
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: |
echo $GCP_SA_KEY > /tmp/gcp_key.json
yarn run upload

0 comments on commit 0e60865

Please sign in to comment.