diff --git a/.woodpecker.yml b/.woodpecker.yml index 3a08589..aa1fef9 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,6 +2,12 @@ # variables que puedo usar? https://woodpecker-ci.org/docs/0.15/usage/environment#built-in-environment-variables pipeline: + style: + image: python:3.9 + commands: + - pip3 install flake8 + - flake8 + tests: image: python:3.9 environment: diff --git a/Rakefile b/Rakefile index cb4a9bc..4ddddf8 100644 --- a/Rakefile +++ b/Rakefile @@ -12,8 +12,10 @@ end desc 'poblar entorno' task :init => [:up] do pecker = YAML.load_file(WOODPECKER_YML) - pecker.dig('pipeline', 'tests', 'commands').grep(/install/).each do |cmd| - compose('exec', 'app.dev', cmd) + ['tests', 'style'].each do |pipeline| + pecker.dig('pipeline', pipeline, 'commands').grep(/install/).each do |cmd| + compose('exec', 'app.dev', cmd) + end end compose('exec', 'app.dev', 'bash .dev/install_module.sh') end @@ -45,7 +47,7 @@ task :tdd do end end end - + compose('exec', 'app.dev', 'flake8 --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,.dev') compose('exec', 'app.dev', 'python3 -m unittest') end