Remove dead sql file. #292
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pipeline | |
on: [push] | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
name: Checks | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Sqlite | |
run: sudo apt install sqlite3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install checks | |
run: pip install pycodestyle pyflakes nose2 | |
- name: Install other dependencies | |
run: pip install -r requirements.txt | |
- name: Run pyflakes | |
run: pyflakes *.py | |
- name: Run pycodestyle | |
run: pycodestyle *.py | |
- name: Run tests | |
run: nose2 | |
dockerCheck: | |
runs-on: ubuntu-latest | |
name: Test Docker | |
needs: [checks] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Docker | |
uses: crazy-max/ghaction-setup-docker@v3 | |
- name: Build container | |
run: docker build -t dse/plastics_pipeline . | |
pipeline: | |
runs-on: ubuntu-latest | |
name: Pipeline | |
needs: [checks] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update apt | |
run: sudo apt update | |
- name: Install Sqlite | |
run: sudo apt install sqlite3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install wget | |
run: sudo apt install wget | |
- name: Install wget2 | |
run: sudo apt install wget2 | |
- name: Install other dependencies | |
run: pip install -r requirements.txt | |
- name: Prepare data | |
run: mkdir output; mv data/snapshot.db output/combined.db | |
- name: Execute | |
run: bash build.sh | |
- name: Zip pipeline | |
run: zip -r pipeline.zip output | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pipeline-result | |
path: pipeline.zip | |
- name: Check output | |
run: bash confirm_output.sh | |
deploy: | |
runs-on: ubuntu-latest | |
environment: deploy | |
name: Deploy | |
if: github.ref == 'refs/heads/deploy' | |
needs: [pipeline, dockerCheck] | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: pipeline-result | |
- name: Upload | |
uses: Creepios/[email protected] | |
with: | |
host: ${{ secrets.SFTPHOST }} | |
port: 22 | |
username: ${{ secrets.SFTPUSER }} | |
password: ${{ secrets.SFTPPASSWORD }} | |
localPath: './pipeline.zip' | |
remotePath: './global-plastics-tool.org/data' | |
- name: Trigger | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CROSS_TOKEN }} | |
repository: SchmidtDSE/plastics-ghg-pipeline | |
event-type: data-update |