Skip to content

Fix usage of s3 resource #14

Fix usage of s3 resource

Fix usage of s3 resource #14

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
test-and-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-import-order
pip install -e ".[test]"
- name: Run flake8
run: |
flake8 . --count --statistics \
--select=E,W,F,I \
--show-source
- name: Run pytest
run: |
pytest tests/
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract branch name
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ncsa/downscaled-climate-data:${{ env.BRANCH_NAME }}