Merge pull request #53 from cfe-lab/dependabot/bundler/docs/faraday-2… #909
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: main | |
| on: push | |
| jobs: | |
| quicktest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 python3-pip ncbi-blast+ mafft | |
| - name: Run build | |
| run: pip3 install .[test] | |
| - name: Run tests and collect coverage | |
| run: pytest -v -m "not slow" --cov=./src | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| slowtest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| testcase: ["tests/test_end_to_end.py::test_large", "tests/test_end_to_end.py::test_large_csv", "tests/test_end_to_end.py::test_large_hxb2"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 python3-pip ncbi-blast+ mafft | |
| - name: Run build | |
| run: pip3 install .[test] | |
| - name: Run tests and collect coverage | |
| run: pytest -v ${{ matrix.testcase }} | |
| installtest: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 python3-pip ncbi-blast+ mafft | |
| - name: Upgrade packaging support | |
| run: pip3 install --upgrade pip | |
| - name: Run build | |
| run: pip3 install . | |
| - name: Check installed version | |
| run: test "$(git describe --tags --abbrev=0)" == "v$(cfeintact version)" | |
| - name: Run test | |
| run: cfeintact check --subtype B tests/data-small.fasta && test -f "defects.csv" | |
| dockerinstall: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Needed for git tags. | |
| - name: Derive version from latest git tag | |
| id: gitver | |
| shell: bash | |
| run: | | |
| VERSION="$(git describe | sed 's/^v//')" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Using version: $VERSION" | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: ${{ github.ref == 'refs/heads/master' }} | |
| tags: | | |
| ghcr.io/cfe-lab/cfeintact:${{ steps.gitver.outputs.version }} | |
| ghcr.io/cfe-lab/cfeintact:latest | |
| cache-from: type=gha,scope=docker-cfeintact | |
| cache-to: type=gha,mode=max,scope=docker-cfeintact | |
| - name: Run docker image entrypoint | |
| run: docker run ghcr.io/cfe-lab/cfeintact:latest --help | |
| - name: Run test | |
| run: | | |
| docker run --rm -v .:/w ghcr.io/cfe-lab/cfeintact check --subtype B "tests/data-small.fasta" | |
| test -f "defects.csv" | |
| linter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 python3-pip | |
| - name: Run build | |
| run: pip3 install .[dev] | |
| - name: Run linter | |
| run: flake8 | |
| typechecker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 python3-pip | |
| - name: Run build | |
| run: pip3 install .[dev] | |
| - name: Run typechecker | |
| run: mypy |