update readme again #197
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: build-test | |
# Controls when the action will run. | |
on: [push] | |
# Triggers the workflow on push or pull request events but only for the master branch | |
# push: | |
# branches: [ master ] | |
# pull_request: | |
# branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
#workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Build, Test and Push | |
steps: | |
- uses: actions/checkout@v2 | |
# with: | |
# token: ${{ secrets.GIT_TOKEN }} | |
- name: Install System dependencies | |
run: sudo apt update && sudo apt install -y $(echo $(cat requirements/ubuntu.txt)) | |
- name: Docker login | |
run: docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASS }} | |
- name: Build Docker Image | |
# env: | |
# GIT_TOKEN: ${{ secrets.GIT_TOKEN }} | |
# run: docker build --build-arg GIT_TOKEN -t metocean/moana-qc:${GITHUB_REF#refs/*/} . | |
run: docker build -t metocean/moana-qc:${GITHUB_REF#refs/*/} . | |
- name: Run tests | |
# env: | |
# GIT_TOKEN: ${{ secrets.GIT_TOKEN }} | |
run: docker run --rm metocean/moana-qc:${GITHUB_REF#refs/*/} pytest moana-qc --cov | |
- name: Docker push | |
run: docker push metocean/moana-qc:${GITHUB_REF#refs/*/} | |
- name: Docker logout | |
run: docker logout |