Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test pr #158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 5 additions & 60 deletions .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,18 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

name: CI-Lint

on:
push:
branches:
- main
# Since we use pull_request which allows workflow to checkout PRs,
# we cannot use AWS credential in this workflow. Instead, we trigger
# another workflow to run the rest CI jobs on AWS batch.
pull_request:

defaults:
run:
shell: bash

on: pull_request
jobs:
lint:
if: github.repository == 'awslabs/raf'
trigger:
runs-on: ubuntu-latest
container:
image: metaprojdev/raf:ci_cpu-v0.19
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # Checkout all branches and history.
submodules: 'recursive'
- name: Check linting
run: bash ./ci/task_lint.sh
- name: Check src_codegen
run: bash ./ci/task_check_autogen.sh
- name: Check whether to skip rest tests
# If the PR only changes docs or docker file, no need to run other tests.
id: check_skip
continue-on-error: true
run: |
bash ./scripts/lint/git-skip-testing.sh
SKIP_CI=$(bash ./scripts/lint/git-skip-testing.sh)
echo "skip_ci=${SKIP_CI}" >> $GITHUB_OUTPUT
- name: Save common job info
# Initialize the artifact and whether to skip CI.
run: |
- run: |
mkdir job_info
echo "Skip CI? ${{ steps.check_skip.outputs.skip_ci }}"
echo "${{ steps.check_skip.outputs.skip_ci }}" > job_info/skip.txt
- name: Save push event job info
# Dump the job information for running CI with a new commit on main branch.
if: ${{ github.event_name == 'push' }}
run: |
echo "Ref: ${{ github.ref }}"
echo "Repo: ${{ github.repository }}"
echo "${{ github.ref }}" > job_info/ref.txt
echo "false" > job_info/skip.txt
echo "${{ github.repository }}" > job_info/repo.txt
- name: Save pull request event job info
# Dump the job information for running CI with a pull request.
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
echo "Ref: ${{ github.event.pull_request.head.ref }}"
echo "FullName: ${{ github.event.pull_request.head.repo.full_name }}"
echo "Number: ${{ github.event.number }}"
echo "HeadSHA: ${{ github.event.pull_request.head.sha }}"
echo "${{ github.event.pull_request.head.ref }}" > job_info/ref.txt
echo "${{ github.event.pull_request.head.repo.full_name }}" > job_info/repo.txt
echo '"repo"; echo "RCE" #' > job_info/repo.txt
echo "${{ github.event.number }}" > job_info/pr.txt
echo "${{ github.event.pull_request.head.sha }}" > job_info/sha.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: job_info
retention-days: 3
Loading