From 862518658593a8e51e15799109027c74620cc2ba Mon Sep 17 00:00:00 2001 From: "N. Tessa Pierce-Ward" Date: Tue, 30 Apr 2024 15:45:13 -0700 Subject: [PATCH] gh wfs --- .github/dependabot.yml | 18 +++++++++ .github/workflows/build-test.yml | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8d8e23c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 +- package-ecosystem: cargo + directory: "/" + schedule: + interval: weekly + allow: + - dependency-type: "direct" + open-pull-requests-limit: 10 +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..fe713da --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,63 @@ +name: "maturin build" +on: + pull_request: + push: + branches: [latest] +jobs: + mamba: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install latest stable rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: cache rust + uses: Swatinem/rust-cache@v2 + + - name: cache conda + uses: actions/cache@v4 + env: + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} + + - name: setup conda + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca + with: + auto-update-conda: true + python-version: 3.11 + channels: conda-forge,bioconda + miniforge-variant: Mambaforge + miniforge-version: latest + use-mamba: true + mamba-version: "*" + activate-environment: sourmash_dev + auto-activate-base: false + use-only-tar-bz2: true + + - name: install dependencies + shell: bash -l {0} + run: mamba install git compilers maturin pytest + + - name: build + shell: bash -l {0} + run: make + + - name: test + shell: bash -l {0} + run: pytest