diff --git a/.github/workflows/ci-dev.yaml b/.github/workflows/ci-dev.yaml new file mode 100644 index 0000000..97e9948 --- /dev/null +++ b/.github/workflows/ci-dev.yaml @@ -0,0 +1,31 @@ +name: CI +on: + pull_request: + branches: ["main"] + push: + branches: ["main"] + +jobs: + ci: + uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev + with: + distro: shotgun + additional-reports-path: ./coverage.xml + additional-reports-name: coverage + + coverage: + needs: [ci] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v3 + name: 'Fetch coverage from builds' + with: + name: ${{ needs.ci.outputs.additional-reports-name }} + path: ${{ needs.ci.outputs.additional-reports-path }} + + - uses: codecov/codecov-action@v3 + name: 'Upload coverage' + with: + fail_ci_if_error: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 28a1a9e..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Test and build - -on: - pull_request: - branches: - - main - push: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install dependencies - run: | - pip install -q https://github.com/qiime2/q2lint/archive/master.zip - pip install -q flake8 - - - name: Lint - run: make lint - - build-and-test: - needs: lint - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - with: - # necessary for versioneer - fetch-depth: 0 - - - name: Hack - template coverage output path - run: echo "COV=coverage xml -o $GITHUB_WORKSPACE/coverage.xml" >> $GITHUB_ENV - - # TODO: update this to @v1 when it lands - - uses: qiime2/action-library-packaging@alpha1 - with: - package-name: q2-amr - additional-tests: ${{ env.COV }} - build-target: dev - library-token: ${{ secrets.LIBRARY_TOKEN }} - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - with: - fail_ci_if_error: true diff --git a/.github/workflows/join-release.yaml b/.github/workflows/join-release.yaml new file mode 100644 index 0000000..298bce4 --- /dev/null +++ b/.github/workflows/join-release.yaml @@ -0,0 +1,6 @@ +name: join-release +on: + workflow_dispatch: {} +jobs: + release: + uses: qiime2/distributions/.github/workflows/lib-join-release.yaml@dev diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml new file mode 100644 index 0000000..fdbcab3 --- /dev/null +++ b/.github/workflows/tag-release.yaml @@ -0,0 +1,7 @@ +name: tag-release +on: + push: + branches: ["Release-*"] +jobs: + tag: + uses: qiime2/distributions/.github/workflows/lib-tag-release.yaml@dev diff --git a/README.md b/README.md index b7594bc..e2de7e5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # q2-amr -![CI](https://github.com/bokulich-lab/q2-assembly/actions/workflows/ci.yml/badge.svg) -[![codecov](https://codecov.io/gh/bokulich-lab/q2-assembly/branch/main/graph/badge.svg?token=THMBOFUZR0)](https://codecov.io/gh/bokulich-lab/q2-assembly) +![CI](https://github.com/bokulich-lab/q2-amr/actions/workflows/ci-dev.yaml/badge.svg) +[![codecov](https://codecov.io/gh/bokulich-lab/q2-amr/branch/main/graph/badge.svg?token=THMBOFUZR0)](https://codecov.io/gh/bokulich-lab/q2-amr) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) QIIME 2 plugin for antimicrobial resistance gene annotation of MAGs and metagenomic reads.