Weak lensing: DC2 updates (#1101) #2948
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
| # This workflow will install Python dependencies, run tests. | |
| # For more information see: | |
| # https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout github repo (+ download lfs dependencies) | |
| uses: actions/checkout@v3 | |
| with: | |
| lfs: true | |
| - name: Free up disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | |
| df -h | |
| - name: Install fftw3 | |
| run: sudo apt-get install libfftw3-dev | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Create environment variables | |
| run: | | |
| echo "JUPYTER_PLATFORM_DIRS=1" >> $GITHUB_ENV | |
| echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run ruff format check | |
| run: uv run ruff format --check . | |
| - name: Run ruff linter | |
| run: uv run ruff check bliss/ tests/ case_studies/ | |
| - name: Run Tests on the CPU | |
| run: uv run pytest --cov=./bliss --cov-report=xml --durations=0 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| env_vars: OS,PYTHON | |
| name: codecov-umbrella | |
| fail_ci_if_error: true |