diff --git a/.github/workflows/BranchCI.yaml b/.github/workflows/BranchCI.yaml new file mode 100644 index 0000000..32034b8 --- /dev/null +++ b/.github/workflows/BranchCI.yaml @@ -0,0 +1,13 @@ +name: BranchCI + +on: + push: + branches-ignore: + - 'main' + +jobs: + branch-ci: + name: Branch CI + uses: molssi-seamm/devops/.github/workflows/BranchCI.yaml@main + with: + src : seamm_util diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 405fa7b..a172f86 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -7,109 +7,10 @@ on: pull_request: branches: - "main" - schedule: - # Run on the main branch by default Sunday morning at 3:30: - - cron: "30 3 * * 0" jobs: - lint: - name: Lint ${{ matrix.os }} Py${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.9] - - steps: - - uses: actions/checkout@v1 - - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - - # More info on options: https://github.com/conda-incubator/setup-miniconda - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python-version }} - environment-file: devtools/conda-envs/test_env.yaml - - # channels: conda-forge,defaults - - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - - - name: Install package - - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - - name: Run linters - - # conda setup requires this special shell - shell: bash -l {0} - - run: | - black --check --diff seamm_util tests - flake8 seamm_util tests - - test: - name: Test ${{ matrix.os }} Py${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - needs: lint - strategy: - matrix: - os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: [3.8, 3.9] - - steps: - - uses: actions/checkout@v1 - - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - - - # More info on options: https://github.com/conda-incubator/setup-miniconda - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python-version }} - environment-file: devtools/conda-envs/test_env.yaml - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - - - name: Install package - - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - - - name: Run tests - - # conda setup requires this special shell - shell: bash -l {0} - - run: | - pytest -v --cov=seamm_util --cov-report=xml --color=yes tests/ - - - name: CodeCov - uses: codecov/codecov-action@v2 - with: - file: ./coverage.xml - flags: unittests - name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} + ci: + name: CI + uses: molssi-seamm/devops/.github/workflows/CI.yaml@main + with: + src : seamm_util diff --git a/.github/workflows/CodeQL.yaml b/.github/workflows/CodeQL.yaml new file mode 100644 index 0000000..1704ec3 --- /dev/null +++ b/.github/workflows/CodeQL.yaml @@ -0,0 +1,13 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + +jobs: + codeql: + name: CodeQL + uses: molssi-seamm/devops/.github/workflows/CodeQL.yaml@main diff --git a/.github/workflows/Docs.yaml b/.github/workflows/Docs.yaml deleted file mode 100644 index 7654130..0000000 --- a/.github/workflows/Docs.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Documentation - -on: push - -jobs: - docs: - name: Docs ubuntu-latest Py3.9 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - # This gets all branches (1 = only current branch) - fetch-depth: 0 - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - # More info on options: https://github.com/conda-incubator/setup-miniconda - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: 3.9 - environment-file: devtools/conda-envs/test_env.yaml - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - - name: Install package - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - name: Build documentation - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash -l {0} - run: | - docs/buildDocs.sh diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 9e21b26..efe0d47 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -7,111 +7,9 @@ on: - "main" jobs: - lint: - name: Lint ubuntu-latest Py3.9 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - # More info on options: https://github.com/conda-incubator/setup-miniconda - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: 3.9 - environment-file: devtools/conda-envs/test_env.yaml - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - - name: Install package - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - name: Run linters - shell: bash -l {0} - run: | - black --check --diff seamm_util tests - flake8 seamm_util tests - - test: - name: Test ${{ matrix.os }} Py${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - needs: lint - strategy: - matrix: - os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: [3.8, 3.9] - steps: - - uses: actions/checkout@v1 - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python-version }} - environment-file: devtools/conda-envs/test_env.yaml - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - - name: Install package - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - name: Run tests - shell: bash -l {0} - run: | - pytest -v --cov=seamm_util --cov-report=xml --color=yes tests/ - - name: CodeCov - uses: codecov/codecov-action@v2 - with: - file: ./coverage.xml - flags: unittests - name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} - - deploy: - name: PyPi ubuntu-latest Py3.9 - # Run only for tagged releases publishing development or release candidates - # only to test.pypi, otherwise to both it and the main pypi. - if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') - runs-on: ubuntu-latest - needs: [lint, test] - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.9 - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - name: Install package - shell: bash -l {0} - run: | - python -m pip install . --no-deps - conda list - - name: Install pypa/build - run: | - python -m pip install build --user - - name: Build a binary wheel and a source tarball - run: | - python -m build --sdist --wheel --outdir dist/ - ls -l dist/ - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true - - name: Publish distribution 📦 to PyPI - if: contains(github.ref, 'dev') == false && contains(github.ref, 'rc') == false - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }} + release: + name: Release + uses: molssi-seamm/devops/.github/workflows/Release.yaml@main + with: + src : seamm_util + secrets: inherit