From a644dd01e42d0b175c22c826da0b4e342141433e Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Wed, 1 Nov 2023 23:20:59 -0700 Subject: [PATCH] Remove preview workflow, do WPT lint in PR workflow (#3131) --- .github/workflows/pr.yml | 21 ++++----- .github/workflows/workflow.yml | 80 ---------------------------------- .github/workflows/wpt.yml | 26 ----------- 3 files changed, 9 insertions(+), 118 deletions(-) delete mode 100644 .github/workflows/workflow.yml delete mode 100644 .github/workflows/wpt.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0ae4a0a3104f..a398bf13ac82 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,21 +8,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.1 + - uses: actions/checkout@v3 with: persist-credentials: false - - run: | - git fetch origin ${{ github.event.pull_request.head.sha }} - git checkout ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-node@v2-beta + - uses: actions/setup-node@v3 with: node-version: "16.x" - run: npm ci - run: npm test - - run: | - mkdir deploy-build/ - cp -r README.md src standalone out docs deploy-build/ - - uses: actions/upload-artifact@v2 - with: - name: pr-artifact - path: deploy-build/ + - name: copy out-wpt to wpt tree + run: | + git clone --depth 2 https://github.com/web-platform-tests/wpt.git + rsync -av out-wpt/ wpt/webgpu + - name: test wpt lint + run: ./wpt lint + working-directory: ./wpt diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml deleted file mode 100644 index 0d475a269e7b..000000000000 --- a/.github/workflows/workflow.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Workflow CI - -on: - workflow_run: - workflows: - - "Pull Request CI" - types: - - completed - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.1 - with: - persist-credentials: false - - run: | - PR=$(curl https://api.github.com/search/issues?q=${{ github.event.workflow_run.head_sha }} | - grep -Po "(?<=${{ github.event.workflow_run.repository.full_name }}\/pulls\/)\d*" | head -1) - echo "PR=$PR" >> $GITHUB_ENV - - uses: actions/github-script@v3 - id: pr-artifact - with: - github-token: ${{secrets.GITHUB_TOKEN}} - result-encoding: string - script: | - const artifacts_url = context.payload.workflow_run.artifacts_url - const artifacts_req = await github.request(artifacts_url) - const artifact = artifacts_req.data.artifacts[0] - const download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: artifact.id, - archive_format: "zip" - }) - return download.url - - run: | - rm -rf * - curl -L -o "pr-artifact.zip" "${{ steps.pr-artifact.outputs.result }}" - unzip -o pr-artifact.zip - rm pr-artifact.zip - - run: | - cat << EOF >> firebase.json - { - "hosting": { - "public": ".", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ] - } - } - EOF - cat << EOF >> .firebaserc - { - "projects": { - "default": "gpuweb-cts" - } - } - EOF - - id: deployment - continue-on-error: true - uses: FirebaseExtended/action-hosting-deploy@v0 - with: - firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CTS }} - expires: 10d - channelId: cts-prs-${{ env.PR }}-${{ github.event.workflow_run.head_sha }} - - uses: peter-evans/create-or-update-comment@v1 - continue-on-error: true - if: ${{ steps.deployment.outcome == 'success' }} - with: - issue-number: ${{ env.PR }} - body: | - Previews, as seen when this [build job](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}) started (${{ github.event.workflow_run.head_sha }}): - [**Run tests**](${{ steps.deployment.outputs.details_url }}/standalone/) | [**View tsdoc**](${{ steps.deployment.outputs.details_url }}/docs/tsdoc/) - diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml deleted file mode 100644 index 729fd131c63d..000000000000 --- a/.github/workflows/wpt.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: WPT Lint Test - -on: - pull_request: - branches: [main] - workflow_dispatch: - -jobs: - test-wpt-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - uses: actions/setup-node@v3 - with: - node-version: "16.x" - - run: npm ci - - run: npm run wpt - - name: copy out-wpt to wpt tree - run: | - git clone --depth 2 https://github.com/web-platform-tests/wpt.git - rsync -av out-wpt/ wpt/webgpu - - name: test wpt lint - run: ./wpt lint - working-directory: ./wpt