Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GFW Creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paleoclimate Dynamics
Projects
PalMod
GFW Creator
Commits
073325f5
Unverified
Commit
073325f5
authored
4 years ago
by
Paul Gierz
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Create python-package.yml
parent
36a1191c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/python-package.yml
+39
-0
39 additions, 0 deletions
.github/workflows/python-package.yml
with
39 additions
and
0 deletions
.github/workflows/python-package.yml
0 → 100644
+
39
−
0
View file @
073325f5
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name
:
Python package
on
:
push
:
branches
:
[
master
]
pull_request
:
branches
:
[
master
]
jobs
:
build
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
[
'
3.6'
,
'
3.7'
,
'
3.8'
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install dependencies
run
:
|
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-
name
:
Lint with flake8
run
:
|
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
-
name
:
Test with pytest
run
:
|
pytest
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment