-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: run github actions on pull requests (#27786)
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
tests: | ||
name: Static analysis | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
os: ['ubuntu-20.04'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system requirements | ||
run: sudo apt update && sudo apt install -y libxmlsec1-dev | ||
|
||
- name: Install pip | ||
run: python -m pip install -r requirements/pip.txt | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache-dir | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Cache pip dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
|
||
- name: Install python dependencies | ||
run: pip install -r requirements/edx/development.txt | ||
|
||
- name: Static code analysis | ||
run: make check-types |
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