From fcd57e1023fd42d81f1fb3c0ea340f9afe57d015 Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Sat, 25 Mar 2023 16:47:52 +0000 Subject: [PATCH 1/4] Bury to Spydus; VPN for Luci --- .github/workflows/test.yml | 11 ++++++++++- data/data.json | 8 ++------ tests/enterprise.test.js | 1 - tests/spydus.test.js | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 308a31c..43b50ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,5 +10,14 @@ jobs: - uses: actions/checkout@v2 - name: Install modules run: npm install + - name: Install and Launch OpenVPN + run: | + curl ${{ secrets.OVPN_URL }} --output config.ovpn --silent + sudo apt-get update + sudo apt-get --assume-yes --no-install-recommends install openvpn + sudo openvpn --config "config.ovpn" --auth-user-pass <(echo -e ${{ secrets.OVPN_USERNAME }}"\n"${{ secrets.OVPN_PASSWORD }}) --daemon - name: Run tests - run: npm run test-ci \ No newline at end of file + run: npm run test-ci + - name: Close OpenVPN + run: | + sudo killall openvpn \ No newline at end of file diff --git a/data/data.json b/data/data.json index f8013f2..8978a8c 100644 --- a/data/data.json +++ b/data/data.json @@ -218,12 +218,8 @@ { "Name": "Bury", "Code": "E08000002", - "Type": "enterprise", - "Available": [ - "In stock" - ], - "TitleDetailUrl": "search/detailnonmodal.detail.detailavailabilityaccordions:lookuptitleinfo/ent:[ITEMID]/ILS/0/true/true", - "Url": "https://bury.ent.sirsidynix.net.uk/client/en_GB/default/" + "Type": "spydus", + "Url": "https://bury.spydus.co.uk/" }, { "Name": "Caerphilly", diff --git a/tests/enterprise.test.js b/tests/enterprise.test.js index 50c625f..b5abac0 100644 --- a/tests/enterprise.test.js +++ b/tests/enterprise.test.js @@ -9,7 +9,6 @@ test('E08000032 - Bradford', async () => await index.runTest('Bradford'), 300000 test('E09000005 - Brent', async () => await index.runTest('Brent'), 300000); test('W06000013 - Pen-y-bont ar Ogwr - Bridgend', async () => await index.runTest('Pen-y-bont ar Ogwr - Bridgend'), 300000); test('E06000023 - Bristol City', async () => await index.runTest('Bristol City'), 300000); -test('E08000002 - Bury', async () => await index.runTest('Bury'), 300000); test('W06000018 - Caerphilly', async () => await index.runTest('Caerphilly'), 300000); test('W06000015 - Caerdydd - Cardiff', async () => await index.runTest('Caerdydd - Cardiff'), 300000); test('W06000010 - Sir Gaerfyrddin - Carmarthenshire', async () => await index.runTest('Sir Gaerfyrddin - Carmarthenshire'), 300000); diff --git a/tests/spydus.test.js b/tests/spydus.test.js index 8a3a753..82029f9 100644 --- a/tests/spydus.test.js +++ b/tests/spydus.test.js @@ -9,6 +9,7 @@ test('E06000008 - Blackburn with Darwen', async () => await index.runTest('Black test('E08000001 - Bolton', async () => await index.runTest('Bolton'), 300000); test('E06000043 - Brighton and Hove', async () => await index.runTest('Brighton and Hove'), 300000); test('E10000002 - Buckinghamshire', async () => await index.runTest('Buckinghamshire'), 300000); +test('E08000002 - Bury', async () => await index.runTest('Bury'), 300000); test('E08000033 - Calderdale', async () => await index.runTest('Calderdale'), 300000); test('E10000003 - Cambridgeshire', async () => await index.runTest('Cambridgeshire'), 300000); test('E09000007 - Camden', async () => await index.runTest('Camden'), 300000); From a96a5506c6228850307a92a50be27b43d3326e1a Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Sat, 25 Mar 2023 16:48:36 +0000 Subject: [PATCH 2/4] Fix Action YAML --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43b50ea..3dd0344 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,11 +11,11 @@ jobs: - name: Install modules run: npm install - name: Install and Launch OpenVPN - run: | - curl ${{ secrets.OVPN_URL }} --output config.ovpn --silent - sudo apt-get update - sudo apt-get --assume-yes --no-install-recommends install openvpn - sudo openvpn --config "config.ovpn" --auth-user-pass <(echo -e ${{ secrets.OVPN_USERNAME }}"\n"${{ secrets.OVPN_PASSWORD }}) --daemon + run: | + curl ${{ secrets.OVPN_URL }} --output config.ovpn --silent + sudo apt-get update + sudo apt-get --assume-yes --no-install-recommends install openvpn + sudo openvpn --config "config.ovpn" --auth-user-pass <(echo -e ${{ secrets.OVPN_USERNAME }}"\n"${{ secrets.OVPN_PASSWORD }}) --daemon - name: Run tests run: npm run test-ci - name: Close OpenVPN From 5e5a22ee51d3ddb31820fb34a82ae120615e0f8f Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Sat, 25 Mar 2023 16:48:58 +0000 Subject: [PATCH 3/4] Fix Action YAML again --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dd0344..f79af92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,5 +19,5 @@ jobs: - name: Run tests run: npm run test-ci - name: Close OpenVPN - run: | - sudo killall openvpn \ No newline at end of file + run: | + sudo killall openvpn \ No newline at end of file From 44eabb0a489f3af22b63c8c94d5fce38f02b1e1b Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Sat, 25 Mar 2023 16:54:51 +0000 Subject: [PATCH 4/4] More Actions changes --- .github/workflows/test.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f79af92..3242f11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,16 @@ jobs: - uses: actions/checkout@v2 - name: Install modules run: npm install - - name: Install and Launch OpenVPN + - name: Install OpenVPN run: | curl ${{ secrets.OVPN_URL }} --output config.ovpn --silent - sudo apt-get update - sudo apt-get --assume-yes --no-install-recommends install openvpn - sudo openvpn --config "config.ovpn" --auth-user-pass <(echo -e ${{ secrets.OVPN_USERNAME }}"\n"${{ secrets.OVPN_PASSWORD }}) --daemon + sudo apt update + sudo apt install -y openvpn openvpn-systemd-resolved + - name: Connect to VPN + uses: "kota65535/github-openvpn-connect-action@v2" + with: + config_file: config.ovpn + username: ${{ secrets.OVPN_USERNAME }} + password: ${{ secrets.OVPN_PASSWORD }} - name: Run tests run: npm run test-ci - - name: Close OpenVPN - run: | - sudo killall openvpn \ No newline at end of file