Merge pull request #73 from autogluon/dependabot/pip/black-gte-23.1.9… #1146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
pull_request: | |
types: [labeled, opened, synchronize] | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
lint_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Lint Check | |
run: | | |
chmod +x ./.github/workflow_scripts/lint_check.sh && ./.github/workflow_scripts/lint_check.sh | |
run_tests: | |
needs: lint_check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Run AutoGluon-RAG Tests | |
run: | | |
chmod +x ./.github/workflow_scripts/test_agrag.sh && ./.github/workflow_scripts/test_agrag.sh | |
build_doc: | |
if: ${{ github.event_name != 'schedule' }} | |
needs: [run_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
if: ${{ github.event_name != 'pull_request_target' }} | |
uses: actions/checkout@v4 | |
- name: Checkout repository(Pull Request Target) | |
if: ${{ github.event_name == 'pull_request_target' }} | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Env Vars | |
uses: ./.github/actions/setup-env-vars | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::369469875935:role/AutoGluonRAGCIDocRole | |
role-duration-seconds: 3600 | |
aws-region: us-east-1 | |
- name: Build Doc(For push) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
chmod +x ./.github/workflow_scripts/build_doc.sh | |
./.github/workflow_scripts/build_doc.sh '${{ github.ref }}' '${{ github.repository }}' '${{ env.SHORT_SHA }}' | |
- name: Build Doc(For pull request) | |
if: ${{ github.event_name == 'pull_request_target' }} | |
env: | |
branch: ${{ github.event.pull_request.head.ref }} | |
run: | | |
chmod +x ./.github/workflow_scripts/build_doc.sh | |
./.github/workflow_scripts/build_doc.sh "$branch" '${{ github.event.pull_request.head.repo.full_name }}' '${{ env.SHORT_SHA }}' PR-'${{ github.event.number }}' | |
- name: Comment on PR | |
if: ${{ github.event_name == 'pull_request_target' }} | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.number }} | |
body: | | |
Job PR-${{ github.event.number }}-${{ env.SHORT_SHA }} is done. | |
Docs are uploaded to https://d1at46xkvcde0c.cloudfront.net/PR-${{ github.event.number }}/${{ env.SHORT_SHA }}/index.html | |