Skip to content

Commit

Permalink
Schedule daily test suite runs on main (#431)
Browse files Browse the repository at this point in the history
* Schedule daily test suite runs on main

* Linting

* Update megalinter
  • Loading branch information
TimPansino authored Nov 15, 2021
1 parent 6872298 commit d48eb92
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Mega-Linter GitHub Action configuration file
# More info at https://nvuillam.github.io/mega-linter
# More info at https://megalinter.github.io
name: Mega-Linter

on:
Expand All @@ -14,16 +14,11 @@ env: # Comment env block if you do not want to apply fixes
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)

jobs:
# Cancel duplicate jobs: https://github.com/fkirc/skip-duplicate-actions#option-3-cancellation-only
cancel_duplicates:
name: Cancel duplicate jobs
runs-on: ubuntu-latest
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
name: Mega-Linter
runs-on: ubuntu-latest
Expand All @@ -39,11 +34,11 @@ jobs:
- name: Mega-Linter
id: ml
# You can override Mega-Linter flavor used to have faster performances
# More info at https://nvuillam.github.io/mega-linter/flavors/
uses: nvuillam/mega-linter/flavors/python@v4
# More info at https://megalinter.github.io/flavors/
uses: megalinter/megalinter/flavors/python@v5
env:
# All available variables are described in documentation
# https://nvuillam.github.io/mega-linter/configuration/
# https://megalinter.github.io/configuration/
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Set 'true' if you always want to lint all sources
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
tags-ignore:
- "**"
pull_request:
schedule:
- cron: "0 15 * * *"

jobs:
tests: # Aggregate job that provides a single check for workflow success
Expand Down
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration file for Mega-Linter
# See all available variables at https://nvuillam.github.io/mega-linter/configuration/ and in linters documentation
# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation

APPLY_FIXES: none # all, none, or list of linter keys
DEFAULT_BRANCH: main # Usually master or main
Expand Down

0 comments on commit d48eb92

Please sign in to comment.