github.com/web-platform-tests/wpt.fyi@v0.0.0-20240530210107-70cf978996f1/.github/workflows/ci.yml (about)

     1  name: Continuous Integration
     2  on:
     3    push:
     4      branches:
     5        - main
     6    pull_request:
     7  jobs:
     8    lint:
     9      runs-on: ubuntu-latest
    10      steps:
    11        - uses: actions/checkout@v3
    12        - uses: ./.github/actions/make-in-docker
    13          with:
    14            target: lint
    15    python_test:
    16      runs-on: ubuntu-latest
    17      steps:
    18        - uses: actions/checkout@v3
    19        - uses: ./.github/actions/make-in-docker
    20          with:
    21            target: python_test
    22    go_test:
    23      runs-on: ubuntu-latest
    24      steps:
    25        - uses: actions/checkout@v3
    26        - uses: ./.github/actions/make-in-docker
    27          with:
    28            target: go_test
    29    web_components_test:
    30      runs-on: ubuntu-latest
    31      steps:
    32        - uses: actions/checkout@v3
    33        - uses: ./.github/actions/make-in-docker
    34          with:
    35            target: web_components_test
    36    go_chrome_test:
    37      runs-on: ubuntu-latest
    38      steps:
    39        - uses: actions/checkout@v3
    40        - uses: ./.github/actions/make-in-docker
    41          with:
    42            target: go_chrome_test
    43    go_firefox_test:
    44      runs-on: ubuntu-latest
    45      steps:
    46        - uses: actions/checkout@v3
    47        - uses: ./.github/actions/make-in-docker
    48          with:
    49            target: go_firefox_test
    50    go_cloud_test:
    51      # This job uses real Cloud resources.
    52      # This means this CI job will have access to the service account.
    53      # In that case, similar to deploy.yml, trust only pull requests that are
    54      # made within web-platform-tests and exclude forks.
    55      if: |
    56        (github.repository == 'web-platform-tests/wpt.fyi') &&
    57        ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'web-platform-tests/wpt.fyi' && github.actor != 'dependabot[bot]') ||
    58        (github.event_name != 'pull_request'))
    59      needs: [go_test, go_chrome_test, go_firefox_test]
    60      runs-on: ubuntu-latest
    61      env:
    62        DOCKER_IMAGE: webplatformtests/wpt.fyi:latest
    63        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    64      steps:
    65        - uses: actions/checkout@v2
    66          with:
    67            fetch-depth: 2
    68  
    69        - name: secrets
    70          run: echo "$GCLOUD_KEY_FILE_JSON" > client-secret.json
    71          env:
    72           GCLOUD_KEY_FILE_JSON: ${{ secrets.GCLOUD_KEY_FILE_JSON }}
    73  
    74        - name: Set DOCKER_INSTANCE
    75          run: echo "DOCKER_INSTANCE=wptd-dev-$(echo $RANDOM)" >> $GITHUB_ENV
    76  
    77        - name: pre-installation
    78          run: |
    79            docker pull "${DOCKER_IMAGE}"
    80            bash ./util/docker-dev/run.sh -d -q
    81  
    82        - name: run tests with "cloud" build tag
    83          run: docker exec -t "${DOCKER_INSTANCE}" make go_cloud_test;