diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..c9dae48 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,52 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@2.0.0 + - name: Formatting + uses: github/super-linter@v3.16.1 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_SNAKEMAKE_SNAKEFMT: true + + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@2.0.0 + - name: Linting + uses: snakemake/snakemake-github-action@v1.17.0 + with: + directory: '.test' + snakefile: workflow/Snakefile + args: '--lint' + + run-workflow: + runs-on: ubuntu-latest + needs: + - formatting + - linting + steps: + - uses: actions/checkout@v1 + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@2.0.0 + + - name: snakemake + uses: snakemake/snakemake-github-action@v1.17.0 + with: + directory: .test + snakefile: workflow/Snakefile + args: "--use-conda --show-failed-logs --cores 1 --conda-cleanup-pkgs cache"