diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..3c78fc9 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,49 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + pull_request: + schedule: + - cron: '30 4 * * 1' # Every Monday @ 4h30am UTC + +jobs: + check_skip: + runs-on: ubuntu-latest + if: | + !contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), '[skip ci]') + steps: + - run: | + cat <<'MESSAGE' + github.event_name: ${{ toJson(github.event_name) }} + github.event: + ${{ toJson(github.event) }} + MESSAGE + test: + needs: check_skip + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.8"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then + pip install -r requirements.txt; + else + pip install .; + fi + - name: Test + run: | + simms -dir "J2000,04h00m00.0s,-33d00m00s" -T vla -dt 8 -st 0.5 -sl 0.16667 -nc 32 -f0 856MHz -df 26749.9904kHz -pl XX YY -n mk64.0.5hr.10min.scan.8s.208khz.J0400-3300.ms