Skip to content

Commit

Permalink
ci: Cache pip dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 6, 2023
1 parent 74e7fc2 commit 225f7b6
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 55 deletions.
23 changes: 12 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
version: 2
updates:
# - package-ecosystem: pip
# directory: "/.github/workflows"
# schedule:
# interval: daily
# time: "11:35"
# timezone: "America/Mexico_City"
# reviewers:
# - "edgarrmondragon"
# labels:
# - "dependencies"
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: weekly
time: "11:35"
timezone: "America/Mexico_City"
reviewers:
- "edgarrmondragon"
labels:
- "dependencies"
- "Test/ELTP"
- package-ecosystem: github-actions
directory: "/"
schedule:
Expand All @@ -21,7 +22,7 @@ updates:
- package-ecosystem: "npm"
directory: "/evidence"
schedule:
interval: daily
interval: weekly
time: "11:35"
timezone: "America/Mexico_City"
reviewers:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pip==23.3.1
meltano==3.2.0
2 changes: 0 additions & 2 deletions .github/workflows/contraints.txt

This file was deleted.

91 changes: 57 additions & 34 deletions .github/workflows/melty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@ jobs:
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'Test/ELTP') }}
name: "Meltano Job: ${{ matrix.job }}"
runs-on: ubuntu-latest
container:
image: ghcr.io/meltano/meltano:latest-python3.11
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_IO_TOKEN }}
env:
TAP_GETPOCKET_CONSUMER_KEY: ${{ secrets.TAP_GETPOCKET_CONSUMER_KEY }}
TAP_GETPOCKET_ACCESS_TOKEN: ${{ secrets.TAP_GETPOCKET_ACCESS_TOKEN }}
TAP_GITHUB_AUTH_TOKEN: ${{ secrets.TAP_GITHUB_AUTH_TOKEN }}
TAP_READTHEDOCS_TOKEN: ${{ secrets.TAP_READTHEDOCS_TOKEN }}
TAP_STACKEXCHANGE_KEY: ${{ secrets.TAP_STACKEXCHANGE_KEY }}
TARGET_DUCKDB_PATH: ${{ secrets.TARGET_DUCKDB_PATH }}
env:
TAP_GETPOCKET_CONSUMER_KEY: ${{ secrets.TAP_GETPOCKET_CONSUMER_KEY }}
TAP_GETPOCKET_ACCESS_TOKEN: ${{ secrets.TAP_GETPOCKET_ACCESS_TOKEN }}
TAP_GITHUB_AUTH_TOKEN: ${{ secrets.TAP_GITHUB_AUTH_TOKEN }}
TAP_READTHEDOCS_TOKEN: ${{ secrets.TAP_READTHEDOCS_TOKEN }}
TAP_STACKEXCHANGE_KEY: ${{ secrets.TAP_STACKEXCHANGE_KEY }}
TARGET_DUCKDB_PATH: ${{ secrets.TARGET_DUCKDB_PATH }}
strategy:
matrix:
include:
Expand All @@ -63,8 +58,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Check Meltano
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
meltano.yml
.github/workflows/constraints.txt
- name: Install Meltano
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install meltano[postgres]
meltano --version
- name: Install Plugins
Expand All @@ -91,20 +97,26 @@ jobs:
name: Lint models
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ghcr.io/meltano/meltano:latest-python3.11
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_IO_TOKEN }}
env:
DUCKDB_PATH: ${{ secrets.DUCKDB_PATH }}
env:
DUCKDB_PATH: ${{ secrets.DUCKDB_PATH }}

steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Check Meltano
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
meltano.yml
.github/workflows/constraints.txt
- name: Install Meltano
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install meltano[postgres]
meltano --version
- name: Install SQLFluff
Expand All @@ -121,18 +133,23 @@ jobs:
name: Data Transformation with dbt-duckdb
runs-on: ubuntu-latest
needs: [meltano-run, lint]
container:
image: ghcr.io/meltano/meltano:latest-python3.11
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_IO_TOKEN }}

steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Check Meltano
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
meltano.yml
.github/workflows/constraints.txt
- name: Install Meltano
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install meltano[postgres]
meltano --version
- name: Install dbt-duckdb
Expand All @@ -147,17 +164,23 @@ jobs:
name: Build Evidence site locally
needs: [transform]
runs-on: ubuntu-latest
container:
image: ghcr.io/meltano/meltano:latest-python3.11
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_IO_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Check Meltano
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
meltano.yml
.github/workflows/constraints.txt
- name: Install Meltano
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install meltano[postgres]
meltano --version
- name: Install evidence
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ jobs:
meltano-lock:
name: Meltano Lock Update
runs-on: ubuntu-latest
container:
image: ghcr.io/meltano/meltano:latest-python3.11
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_IO_TOKEN }}

steps:
- name: Checkout Code
uses: actions/checkout@v4.1.1

- name: Check Meltano
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
meltano.yml
.github/workflows/constraints.txt
- name: Install Meltano
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install meltano[postgres]
meltano --version
- name: Meltano Lock Update
Expand Down
2 changes: 1 addition & 1 deletion logging/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ formatters:
handlers:
console:
class: logging.StreamHandler
level: ERROR
level: DEBUG
formatter: structured
stream: "ext://sys.stderr"
file:
Expand Down

0 comments on commit 225f7b6

Please sign in to comment.