Update Slack File Upload API #666
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: PR | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
virtualenvs-create: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'poetry' | |
- name: Install virtual environment | |
run: poetry install | |
- name: Lint scripts | |
run: make lint | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
virtualenvs-create: true | |
- name: Install virtual environment | |
run: poetry install | |
- name: Running unit tests | |
run: make test | |
docker-push: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Tag | |
run: | | |
CLEAN_TAG=$(echo "${{ github.event.pull_request.head.ref }}" | tr / -) | |
echo "TAG=$CLEAN_TAG" >> $GITHUB_ENV | |
- name: Build | |
run: docker build -t onsdigital/eq-survey-runner-benchmark:$TAG . | |
- name: Push | |
run: | | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
echo "Pushing with tag [$TAG]" | |
docker push onsdigital/eq-survey-runner-benchmark:$TAG |