diff --git a/.github/workflows/test_update_api_database.yml b/.github/workflows/test_update_api_database.yml index 4729ac8..7e04a86 100644 --- a/.github/workflows/test_update_api_database.yml +++ b/.github/workflows/test_update_api_database.yml @@ -55,18 +55,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y wget - sudo apt-get install -y software-properties-common - sudo apt install -y gpg gnupg2 apt-transport-https lsb-release ca-certificates - - - name: Remove postgresql 14 - run: sudo apt-get remove -y postgresql-14 postgresql-client-14 + sudo apt-get install -y git - - name: Install postgres-client-15 - run: | - sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - sudo apt-get update - sudo apt-get install -y postgresql-15 postgresql-client-15 + - name: Setup PostgreSQL + uses: tj-actions/install-postgresql@v3 + with: + postgresql-version: 15 - name: Check postgres install run: pg_dump --version @@ -76,29 +70,27 @@ jobs: sudo wget https://dl.min.io/client/mc/release/linux-amd64/mc sudo chmod +x mc sudo mv mc /usr/local/bin - - name: Install python - run: | - sudo apt-get install -y python3 python3-pip - pip install -r requirements.txt + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version-file: ".python-version" + + - name: Install python dependencies + run: pip install -r requirements.txt - name: Install dbt dependencies - run: | - sudo apt-get install -y git - dbt deps + run: dbt deps - name: Download - run: | - ./bash/download.sh + run: ./bash/download.sh - name: Import - run: | - ./bash/import.sh + run: ./bash/import.sh - name: Transform - run: | - ./bash/transform.sh + run: ./bash/transform.sh - name: Export - run: | - ./bash/export.sh + run: ./bash/export.sh \ No newline at end of file