From cbe94ec5236ad461d975a9d91c303811caa18cf8 Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:18:22 -0300 Subject: [PATCH 01/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 110 +++++++++++------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 2154a933..f464a565 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -12,11 +12,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '12.x' + node-version: '16.x' - run: npm ci - run: npm run build @@ -26,9 +26,9 @@ jobs: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Test with unittest @@ -40,61 +40,61 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '0.12', '4', '6', '8', '10', '12', '14' ] # Major releases as described in https://nodejs.org/en/download/releases/ + node: [ '0.12', '4', '6', '8', '10', '12', '14', '16', '17', '18', '19' ] # Major releases as described in https://nodejs.org/en/download/releases/ name: Node ${{ matrix.node }} sample steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - run: npm install - run: npm test - publish: - needs: [build, python-test, js-test] - if: ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event_name == 'schedule' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - registry-url: 'https://registry.npmjs.org' - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - run: npm ci - - name: Build typescript files - run: npm run build - - name: Download csv databases - run: python downloadDatabases.py - env: - MAXMIND_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }} - - name: Build data structures - run: | - python processGeoIpCsv.py - - name: Get currently published data - run: | - mkdir old - cd old - npm init -y - npm install fast-geoip - - name: Compare new and old data - id: compare - run: | - if ! diff -qrN ./data ./old/node_modules/fast-geoip/data; then - echo "::set-output name=changed::true" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config user.name "$GITHUB_ACTOR" - npm version patch - else - echo "::set-output name=changed::false" - fi - - run: npm publish - if: github.event_name == 'push' || ( steps.compare.outputs.changed == 'true' && github.event_name == 'schedule' ) - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Push version changes to github repo - run: git push +# publish: +# needs: [build, python-test, js-test] +# if: ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event_name == 'schedule' +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: '16.x' +# registry-url: 'https://registry.npmjs.org' +# - name: Set up Python +# uses: actions/setup-python@v3 +# with: +# python-version: 3.8 +# - run: npm ci +# - name: Build typescript files +# run: npm run build +# - name: Download csv databases +# run: python downloadDatabases.py +# env: +# MAXMIND_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }} +# - name: Build data structures +# run: | +# python processGeoIpCsv.py +# - name: Get currently published data +# run: | +# mkdir old +# cd old +# npm init -y +# npm install fast-geoip +# - name: Compare new and old data +# id: compare +# run: | +# if ! diff -qrN ./data ./old/node_modules/fast-geoip/data; then +# echo "::set-output name=changed::true" +# git config user.email "$GITHUB_ACTOR@users.noreply.github.com" +# git config user.name "$GITHUB_ACTOR" +# npm version patch +# else +# echo "::set-output name=changed::false" +# fi +# - run: npm publish +# if: github.event_name == 'push' || ( steps.compare.outputs.changed == 'true' && github.event_name == 'schedule' ) +# env: +# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +# - name: Push version changes to github repo +# run: git push From efa41455879473db92566122656d02c6e8be13fa Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:22:59 -0300 Subject: [PATCH 02/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index f464a565..c8c29b7d 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -24,11 +24,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Test with unittest @@ -62,7 +62,7 @@ jobs: # node-version: '16.x' # registry-url: 'https://registry.npmjs.org' # - name: Set up Python -# uses: actions/setup-python@v3 +# uses: actions/setup-python@v4 # with: # python-version: 3.8 # - run: npm ci From 5573372a84385e6b1542f3f097c3e77ba5c80af1 Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:29:47 -0300 Subject: [PATCH 03/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index c8c29b7d..233e0edc 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -16,7 +16,7 @@ jobs: - name: Get Node.js uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: '12.x' - run: npm ci - run: npm run build @@ -59,7 +59,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions/setup-node@v3 # with: -# node-version: '16.x' +# node-version: '12.x' # registry-url: 'https://registry.npmjs.org' # - name: Set up Python # uses: actions/setup-python@v4 From 2b7e4d35f4c56552bfcc7a93b4f187d73642448b Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:37:21 -0300 Subject: [PATCH 04/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 233e0edc..afda4113 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -10,18 +10,18 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Get Node.js uses: actions/setup-node@v3 with: - node-version: '12.x' + node-version: '19.x' - run: npm ci - run: npm run build python-test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12] @@ -59,12 +59,12 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions/setup-node@v3 # with: -# node-version: '12.x' +# node-version: '18.x' # registry-url: 'https://registry.npmjs.org' # - name: Set up Python # uses: actions/setup-python@v4 # with: -# python-version: 3.8 +# python-version: 3.12 # - run: npm ci # - name: Build typescript files # run: npm run build From 8828a70c6c90ffe87ad93880a8d1f0abdec18e99 Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:43:34 -0300 Subject: [PATCH 05/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index afda4113..53bbdde0 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Get Node.js @@ -21,7 +21,7 @@ jobs: - run: npm run build python-test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12] @@ -31,6 +31,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + architecture: x86 - name: Test with unittest run: | python tests/testCsvProcessing.py @@ -65,6 +66,7 @@ jobs: # uses: actions/setup-python@v4 # with: # python-version: 3.12 +# architecture: x86 # - run: npm ci # - name: Build typescript files # run: npm run build From 508af18716adb5d3d4bd69432f43b875e5fc471d Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 21:47:58 -0300 Subject: [PATCH 06/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 53bbdde0..62c9af6f 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Get Node.js @@ -21,7 +21,7 @@ jobs: - run: npm run build python-test: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12] @@ -31,7 +31,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - architecture: x86 - name: Test with unittest run: | python tests/testCsvProcessing.py @@ -55,7 +54,7 @@ jobs: # publish: # needs: [build, python-test, js-test] # if: ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event_name == 'schedule' -# runs-on: ubuntu-latest +# runs-on: ubuntu-20.04 # steps: # - uses: actions/checkout@v3 # - uses: actions/setup-node@v3 @@ -66,7 +65,6 @@ jobs: # uses: actions/setup-python@v4 # with: # python-version: 3.12 -# architecture: x86 # - run: npm ci # - name: Build typescript files # run: npm run build From 522bc74e3038f078b57e39cdfa28eea351a374aa Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 22:03:23 -0300 Subject: [PATCH 07/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 62c9af6f..f513adca 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12] + python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} From 9e60b911bc6364fea3a2b51e018ce11b06a6f1ae Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 22:04:37 -0300 Subject: [PATCH 08/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index f513adca..30929edb 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} From 1a643061697e886a532aad93e785300058974acc Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 22:23:22 -0300 Subject: [PATCH 09/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 30929edb..96ef7aaf 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '0.12', '4', '6', '8', '10', '12', '14', '16', '17', '18', '19' ] # Major releases as described in https://nodejs.org/en/download/releases/ + node: [ '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19' ] # Major releases as described in https://nodejs.org/en/download/releases/ name: Node ${{ matrix.node }} sample steps: - uses: actions/checkout@v3 From b40fcbd7345f27bd6b2956f3e98d3622f2be02d2 Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 22:26:06 -0300 Subject: [PATCH 10/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 94 ++++++++++++------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 96ef7aaf..f2f9fd21 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -51,50 +51,50 @@ jobs: - run: npm install - run: npm test -# publish: -# needs: [build, python-test, js-test] -# if: ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event_name == 'schedule' -# runs-on: ubuntu-20.04 -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/setup-node@v3 -# with: -# node-version: '18.x' -# registry-url: 'https://registry.npmjs.org' -# - name: Set up Python -# uses: actions/setup-python@v4 -# with: -# python-version: 3.12 -# - run: npm ci -# - name: Build typescript files -# run: npm run build -# - name: Download csv databases -# run: python downloadDatabases.py -# env: -# MAXMIND_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }} -# - name: Build data structures -# run: | -# python processGeoIpCsv.py -# - name: Get currently published data -# run: | -# mkdir old -# cd old -# npm init -y -# npm install fast-geoip -# - name: Compare new and old data -# id: compare -# run: | -# if ! diff -qrN ./data ./old/node_modules/fast-geoip/data; then -# echo "::set-output name=changed::true" -# git config user.email "$GITHUB_ACTOR@users.noreply.github.com" -# git config user.name "$GITHUB_ACTOR" -# npm version patch -# else -# echo "::set-output name=changed::false" -# fi -# - run: npm publish -# if: github.event_name == 'push' || ( steps.compare.outputs.changed == 'true' && github.event_name == 'schedule' ) -# env: -# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} -# - name: Push version changes to github repo -# run: git push + publish: + needs: [build, python-test, js-test] + if: ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event_name == 'schedule' + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '19.x' + registry-url: 'https://registry.npmjs.org' + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - run: npm ci + - name: Build typescript files + run: npm run build + - name: Download csv databases + run: python downloadDatabases.py + env: + MAXMIND_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }} + - name: Build data structures + run: | + python processGeoIpCsv.py + - name: Get currently published data + run: | + mkdir old + cd old + npm init -y + npm install fast-geoip + - name: Compare new and old data + id: compare + run: | + if ! diff -qrN ./data ./old/node_modules/fast-geoip/data; then + echo "::set-output name=changed::true" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config user.name "$GITHUB_ACTOR" + npm version patch + else + echo "::set-output name=changed::false" + fi + - run: npm publish + if: github.event_name == 'push' || ( steps.compare.outputs.changed == 'true' && github.event_name == 'schedule' ) + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Push version changes to github repo + run: git push From 563cbf8397035bfc4ed104e6470c20dc239b7f61 Mon Sep 17 00:00:00 2001 From: Luciano Jesus Lima Date: Tue, 13 Dec 2022 22:29:13 -0300 Subject: [PATCH 11/11] Update build-test-publish.yml --- .github/workflows/build-test-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index f2f9fd21..3465c782 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -64,7 +64,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.8 - run: npm ci - name: Build typescript files run: npm run build