From a7b9d3ea36e347769a232c17aeebb5e8f39f26fe Mon Sep 17 00:00:00 2001 From: Kelvin Rodriguez <krodriguez@usgs.gov> Date: Tue, 5 Dec 2023 15:41:04 -0700 Subject: [PATCH] Added tests (#2) --- .github/workflows/ci_testing.yml | 80 ++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/ci_testing.yml diff --git a/.github/workflows/ci_testing.yml b/.github/workflows/ci_testing.yml new file mode 100644 index 0000000..97bf1dc --- /dev/null +++ b/.github/workflows/ci_testing.yml @@ -0,0 +1,80 @@ +name: Pull-Request-CI + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + Build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: conda-incubator/setup-python@v4 + with: + python-version: '3.10' + - name: Install Python Packages + run: | + pip install -r requirements.yml + - name: Build Website + run: | + mkdocs build + - uses: actions/upload-artifact@v3 + with: + name: site + path: site/ + + Spell-and-Grammar-Check: + runs-on: ubuntu-latest + strategy: + fail-fast: false + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/setup-node@v4 + - uses: conda-incubator/setup-python@v4 + with: + python-version: '3.10' + - name: Install Python Packages + run: | + pip install -r requirements.yml + npm i gramma -g + - name: Build Website + run: | + mkdocs build + - name: spell check + run: | + codespell site/ + git diff --name-only origin/main | grep -e .md -e .MD | sed 's/^/"/;s/$/"/' | xargs -t -L1 gramma check -p || true + + Link-Check: + runs-on: ubuntu-latest + strategy: + fail-fast: false + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: conda-incubator/setup-python@v4 + with: + python-version: '3.10' + - name: Install Python Packages + run: | + pip install -r requirements.yml + - name: Build Website + run: | + mkdocs build + - name: spell check + run: | + linkchecker site/index.html --ignore-url '(asc-public-docs/site/docs/software/|manuals/)' -- GitLab